summaryrefslogtreecommitdiff
path: root/sphinx/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/project.py')
-rw-r--r--sphinx/project.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/project.py b/sphinx/project.py
index bb2314c63..d4293cdc4 100644
--- a/sphinx/project.py
+++ b/sphinx/project.py
@@ -10,7 +10,7 @@
import os
from glob import glob
-from typing import Dict, List, Set
+from typing import Dict, List, Optional, Set
from sphinx.locale import __
from sphinx.util import get_matching_files, logging, path_stabilize
@@ -60,7 +60,7 @@ class Project:
return self.docnames
- def path2doc(self, filename: str) -> str:
+ def path2doc(self, filename: str) -> Optional[str]:
"""Return the docname for the filename if the file is document.
*filename* should be absolute or relative to the source directory.