| 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.""" |