spdx_tools.spdx3.writer.console.bundle_writer

 1# SPDX-FileCopyrightText: 2023 spdx contributors
 2#
 3# SPDX-License-Identifier: Apache-2.0
 4from beartype.typing import TextIO
 5
 6from spdx_tools.spdx3.model import Bundle
 7from spdx_tools.spdx3.writer.console.console import write_value
 8from spdx_tools.spdx3.writer.console.spdx_collection_writer import write_collection
 9
10
11def write_bundle(bundle: Bundle, text_output: TextIO, heading: bool = True):
12    if heading:
13        text_output.write("## Bundle\n")
14    write_collection(bundle, text_output)
15    write_value("context", bundle.context, text_output)
def write_bundle( bundle: spdx_tools.spdx3.model.bundle.Bundle, text_output: <class 'TextIO'>, heading: bool = True):
12def write_bundle(bundle: Bundle, text_output: TextIO, heading: bool = True):
13    if heading:
14        text_output.write("## Bundle\n")
15    write_collection(bundle, text_output)
16    write_value("context", bundle.context, text_output)