Skip to content

Commit 69b9a1d

Browse files
shorten line lengths in README, so they can be read on GitHub main page
Signed-off-by: Armin Tänzer <[email protected]>
1 parent a0197f9 commit 69b9a1d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,26 @@ document.creation_info.name = "new document name"
114114
# define a file and a DESCRIBES relationship between the file and the document
115115
checksum = Checksum(ChecksumAlgorithm.SHA1, "71c4025dd9897b364f3ebbb42c484ff43d00791c")
116116

117-
file = File(name="./fileName.py", spdx_id="SPDXRef-File", checksums=[checksum], file_types=[FileType.TEXT],
117+
file = File(name="./fileName.py", spdx_id="SPDXRef-File", checksums=[checksum],
118+
file_types=[FileType.TEXT],
118119
license_concluded=get_spdx_licensing().parse("MIT and GPL-2.0"),
119120
license_comment="licenseComment", copyright_text="copyrightText")
120121

121122
relationship = Relationship("SPDXRef-DOCUMENT", RelationshipType.DESCRIBES, "SPDXRef-File")
122123

123-
# add the file and the relationship to the document (note that we do not use "document.files.append(file)" as that would circumvent the type checking)
124+
# add the file and the relationship to the document
125+
# (note that we do not use "document.files.append(file)" as that would circumvent the type checking)
124126
document.files = document.files + [file]
125127
document.relationships = document.relationships + [relationship]
126128

127-
# validate the edited document and log the validation messages (depending on your use case, you might also want to utilize the provided validation_message.context)
129+
# validate the edited document and log the validation messages
130+
# (depending on your use case, you might also want to utilize the validation_message.context)
128131
validation_messages = validate_full_spdx_document(document)
129132
for validation_message in validation_messages:
130133
logging.warning(validation_message.validation_message)
131134

132-
# if there are no validation messages, the document is valid and we can safely serialize it without validating again
135+
# if there are no validation messages, the document is valid
136+
# and we can safely serialize it without validating again
133137
if not validation_messages:
134138
write_file(document, "new_spdx_document.rdf", validate=False)
135139
```

0 commit comments

Comments
 (0)