From 817318bb8d03b8b37db25bfd7c3a54e3fd6006f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20T=C3=A4nzer?= Date: Wed, 19 Jul 2023 15:32:16 +0200 Subject: [PATCH] set validate=True as default value in the rdf writer to be consistent with the writers of the other formats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Armin Tänzer --- src/spdx_tools/spdx/writer/rdf/rdf_writer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spdx_tools/spdx/writer/rdf/rdf_writer.py b/src/spdx_tools/spdx/writer/rdf/rdf_writer.py index 7756e56c6..d4302f9c6 100644 --- a/src/spdx_tools/spdx/writer/rdf/rdf_writer.py +++ b/src/spdx_tools/spdx/writer/rdf/rdf_writer.py @@ -17,7 +17,7 @@ from spdx_tools.spdx.writer.write_utils import validate_and_deduplicate -def write_document_to_stream(document: Document, stream: IO[bytes], validate: bool, drop_duplicates: bool = True): +def write_document_to_stream(document: Document, stream: IO[bytes], validate: bool = True, drop_duplicates: bool = True): document = validate_and_deduplicate(document, validate, drop_duplicates) graph = Graph() doc_namespace = document.creation_info.document_namespace @@ -51,6 +51,6 @@ def write_document_to_stream(document: Document, stream: IO[bytes], validate: bo graph.serialize(stream, "pretty-xml", encoding="UTF-8", max_depth=100) -def write_document_to_file(document: Document, file_name: str, validate: bool, drop_duplicates: bool = True): +def write_document_to_file(document: Document, file_name: str, validate: bool = True, drop_duplicates: bool = True): with open(file_name, "wb") as out: write_document_to_stream(document, out, validate, drop_duplicates)