reuse.report module¶
Module that contains reports about files and projects for linting.
-
class
reuse.report.
FileReport
(name, path, do_checksum=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, path, do_checksum=True)[source]¶ Generate a FileReport from a path in a Project.
Return type: FileReportInfo
-
classmethod
-
class
reuse.report.
FileReportInfo
(file_report, bad_licenses, missing_licenses)¶ Bases:
tuple
-
bad_licenses
¶ Alias for field number 1
-
file_report
¶ Alias for field number 0
-
missing_licenses
¶ Alias for field number 2
-
-
class
reuse.report.
ProjectReport
(do_checksum=True)[source]¶ Bases:
object
Object that holds linting report about the project.
-
bill_of_materials
()[source]¶ Generate a bill of materials from the project.
See https://spdx.org/specifications.
Return type: str
-
files_without_copyright
¶ Iterable of paths that have no copyright information.
Return type: Iterable
[PathLike
]
-
files_without_licenses
¶ Iterable of paths that have no license information.
Return type: Iterable
[PathLike
]
-
classmethod
generate
(project, paths=None, do_checksum=True)[source]¶ Generate a ProjectReport from a Project.
Return type: ProjectReport
-