MCPcopy
hub / github.com/sphinx-doc/sphinx / __init__

Method __init__

sphinx/project.py:26–41  ·  view source on GitHub ↗
(
        self, srcdir: str | os.PathLike[str], source_suffix: Iterable[str]
    )

Source from the content-addressed store, hash-verified

24 """A project is the source code set of the Sphinx document(s)."""
25
26 def __init__(
27 self, srcdir: str | os.PathLike[str], source_suffix: Iterable[str]
28 ) -> None:
29 #: Source directory.
30 self.srcdir = _StrPath(srcdir)
31
32 #: source_suffix. Same as :confval:`source_suffix`.
33 self.source_suffix = tuple(source_suffix)
34 self._first_source_suffix = next(iter(self.source_suffix), '')
35
36 #: The name of documents belonging to this project.
37 self.docnames: set[str] = set()
38
39 # Bijective mapping between docnames and (srcdir relative) paths.
40 self._path_to_docname: dict[Path, str] = {}
41 self._docname_to_path: dict[str, Path] = {}
42
43 def restore(self, other: Project) -> None:
44 """Take over a result of last build."""

Callers

nothing calls this directly

Calls 1

_StrPathClass · 0.90

Tested by

no test coverage detected