File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212from io import BytesIO
1313from io import StringIO
1414
15- from spdx .checksum import Checksum , ChecksumAlgorithm
15+ from spdx .checksum import Checksum
16+ from spdx .checksum import ChecksumAlgorithm
1617from spdx .creationinfo import Tool
1718from spdx .document import ExtractedLicense
1819from spdx .document import Document
@@ -359,10 +360,10 @@ def write_spdx(
359360 file_entry .copyright = SPDXNone ()
360361
361362 doc .add_file (file_entry )
362- relationship = Relationship (package .spdx_id + " CONTAINS " + file_entry .spdx_id )
363+ relationship = Relationship (f' { package .spdx_id } CONTAINS { file_entry .spdx_id } ' )
363364 doc .add_relationship (relationship )
364365
365- if len ( doc .files ) == 0 :
366+ if not doc .files :
366367 if as_tagvalue :
367368 msg = "# No results for package '{}'.\n " .format (package .name )
368369 else :
You can’t perform that action at this time.
0 commit comments