diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-03-28 01:31:52 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-05-03 16:41:19 +0300 |
commit | 930bf6c327b31aec6112359695f35a2c77fbae21 (patch) | |
tree | 77ec4b549ad46ea2c52b9ba40a0f011451378305 /sphinx/project.py | |
parent | f31af4b8158e6142d918366aa0026e40575af914 (diff) |
refactor: Add Optional to type annotations
Diffstat (limited to 'sphinx/project.py')
-rw-r--r-- | sphinx/project.py | 4 |
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. |