Skip to content

Commit 8ef0cef

Browse files
set validate=True as default value in the rdf writer to be consistent with the writers of the other formats
Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
1 parent 2402596 commit 8ef0cef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/spdx_tools/spdx/writer/rdf/rdf_writer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
from spdx_tools.spdx.writer.write_utils import validate_and_deduplicate
1818

1919

20-
def write_document_to_stream(document: Document, stream: IO[bytes], validate: bool, drop_duplicates: bool = True):
20+
def write_document_to_stream(
21+
document: Document, stream: IO[bytes], validate: bool = True, drop_duplicates: bool = True
22+
):
2123
document = validate_and_deduplicate(document, validate, drop_duplicates)
2224
graph = Graph()
2325
doc_namespace = document.creation_info.document_namespace
@@ -51,6 +53,6 @@ def write_document_to_stream(document: Document, stream: IO[bytes], validate: bo
5153
graph.serialize(stream, "pretty-xml", encoding="UTF-8", max_depth=100)
5254

5355

54-
def write_document_to_file(document: Document, file_name: str, validate: bool, drop_duplicates: bool = True):
56+
def write_document_to_file(document: Document, file_name: str, validate: bool = True, drop_duplicates: bool = True):
5557
with open(file_name, "wb") as out:
5658
write_document_to_stream(document, out, validate, drop_duplicates)

0 commit comments

Comments
 (0)