reuse.report module

Module that contains reports about files and projects for linting.

class reuse.report.FileReport(name: os.PathLike, path: os.PathLike, do_checksum: bool = True)[source]

Bases: object

Object that holds a linting report about a single file. Importantly, it also contains SPDX File information in spdxfile.

classmethod generate(project: reuse.project.Project, path: os.PathLike, do_checksum: bool = True)reuse.report.FileReport[source]

Generate a FileReport from a path in a Project.

to_dict()[source]

Turn the report into a json-like dictionary.

class reuse.report.ProjectReport(do_checksum: bool = True)[source]

Bases: object

Object that holds linting report about the project.

bill_of_materials()str[source]

Generate a bill of materials from the project.

See https://spdx.org/specifications.

Iterable of paths that have no copyright information.

property files_without_licenses: Iterable[os.PathLike]

Iterable of paths that have no license information.

classmethod generate(project: reuse.project.Project, do_checksum: bool = True, multiprocessing: bool = True)reuse.report.ProjectReport[source]

Generate a ProjectReport from a Project.

to_dict()[source]

Turn the report into a json-like dictionary.

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.