reuse.project module
Module that contains the central Project class.
- class reuse.project.Project(root, include_submodules=False, include_meson_subprojects=False)[source]
Bases:
object
Simple object that holds the project’s root, which is necessary for many interactions.
- all_files(directory=None)[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)[source]
If the project root is /tmp/project, and path is /tmp/project/src/file, then return src/file.
- Return type
- property root: pathlib.Path
Path to the root of the project.
- Return type