reuse.report module¶
Module that contains reports about files and projects for linting.
- class reuse.report.FileReport(name: str, path: str | PathLike, do_checksum: bool = True)[source]¶
Bases:
object
Object that holds a linting report about a single file.
- classmethod generate(project: Project, path: str | PathLike, do_checksum: bool = True, add_license_concluded: bool = False) FileReport [source]¶
Generate a FileReport from a path in a Project.
- class reuse.report.ProjectReport(do_checksum: bool = True)[source]¶
Bases:
object
Object that holds linting report about the project.
- bill_of_materials(creator_person: str | None = None, creator_organization: str | None = None) str [source]¶
Generate a bill of materials from the project.
- property files_without_copyright: Set[Path]¶
Set of paths that have no copyright information.
- property files_without_licenses: Set[Path]¶
Set of paths that have no licensing information.
- classmethod generate(project: Project, do_checksum: bool = True, multiprocessing: bool = True, add_license_concluded: bool = False) ProjectReport [source]¶
Generate a ProjectReport from a Project.
- property is_compliant: bool¶
Whether the report is compliant with the REUSE Spec.
- property recommendations: List[str]¶
Generate help for next steps based on found REUSE issues
- to_dict_lint() Dict[str, Any] [source]¶
Collects and formats data relevant to linting from report and returns it as a dictionary.
- Returns:
Dictionary containing data from the ProjectReport object.
- property unused_licenses: Set[str]¶
Set of license identifiers that are not found in any file report.
- property used_licenses: Set[str]¶
Set of license identifiers that are found in file reports.