summaryrefslogtreecommitdiff
path: root/sphinx/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/project.py')
-rw-r--r--sphinx/project.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/sphinx/project.py b/sphinx/project.py
index b0277723f..d5f299598 100644
--- a/sphinx/project.py
+++ b/sphinx/project.py
@@ -20,17 +20,16 @@ from sphinx.util.osutil import SEP, relpath
if TYPE_CHECKING:
from typing import Dict, List, Set # NOQA
- from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)
-EXCLUDE_PATHS = ['**/_sources', '.#*', '**/.#*', '*.lproj/**'] # type: List[unicode]
+EXCLUDE_PATHS = ['**/_sources', '.#*', '**/.#*', '*.lproj/**']
class Project(object):
"""A project is source code set of Sphinx document."""
def __init__(self, srcdir, source_suffix):
- # type: (unicode, Dict[unicode, unicode]) -> None
+ # type: (str, Dict[str, str]) -> None
#: Source directory.
self.srcdir = srcdir
@@ -38,7 +37,7 @@ class Project(object):
self.source_suffix = source_suffix
#: The name of documents belongs to this project.
- self.docnames = set() # type: Set[unicode]
+ self.docnames = set() # type: Set[str]
def restore(self, other):
# type: (Project) -> None
@@ -46,7 +45,7 @@ class Project(object):
self.docnames = other.docnames
def discover(self, exclude_paths=[]):
- # type: (List[unicode]) -> Set[unicode]
+ # type: (List[str]) -> Set[str]
"""Find all document files in the source directory and put them in
:attr:`docnames`.
"""
@@ -63,7 +62,7 @@ class Project(object):
return self.docnames
def path2doc(self, filename):
- # type: (unicode) -> unicode
+ # type: (str) -> str
"""Return the docname for the filename if the file is document.
*filename* should be absolute or relative to the source directory.
@@ -78,7 +77,7 @@ class Project(object):
return None
def doc2path(self, docname, basedir=True):
- # type: (unicode, bool) -> unicode
+ # type: (str, bool) -> str
"""Return the filename for the document name.
If *basedir* is True, return as an absolute path.