Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/spdx_tools/spdx/writer/rdf/rdf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
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
Expand Down Expand Up @@ -51,6 +53,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)