Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-03-28 01:31:52 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-05-03 16:41:19 +0300
commit930bf6c327b31aec6112359695f35a2c77fbae21 (patch)
tree77ec4b549ad46ea2c52b9ba40a0f011451378305 /sphinx/project.py
parentf31af4b8158e6142d918366aa0026e40575af914 (diff)
refactor: Add Optional to type annotations
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.