reuse.project module
Module that contains the central Project class.
- class reuse.project.Project(root: PathLike, include_submodules: bool = False, include_meson_subprojects: bool = False)[source]
Bases:
object
Simple object that holds the project’s root, which is necessary for many interactions.
- all_files(directory: PathLike = None) Iterator[Path] [source]
Yield all files in directory and its subdirectories.
The files that are not yielded are:
Files ignored by VCS (e.g., see .gitignore)
Files/directories matching IGNORE_*_PATTERNS.
- relative_from_root(path: Path) Path [source]
If the project root is /tmp/project, and path is /tmp/project/src/file, then return src/file.
- property root: Path
Path to the root of the project.