spdx_tools.spdx3.writer.console.artifact_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 Artifact
 7from spdx_tools.spdx3.writer.console.console import write_value
 8from spdx_tools.spdx3.writer.console.element_writer import write_element_properties
 9
10
11def write_artifact_properties(artifact: Artifact, text_output: TextIO):
12    write_element_properties(artifact, text_output)
13
14    for property_name in Artifact.__annotations__.keys():
15        write_value(property_name, getattr(artifact, property_name), text_output)
def write_artifact_properties( artifact: spdx_tools.spdx3.model.artifact.Artifact, text_output: <class 'TextIO'>):
12def write_artifact_properties(artifact: Artifact, text_output: TextIO):
13    write_element_properties(artifact, text_output)
14
15    for property_name in Artifact.__annotations__.keys():
16        write_value(property_name, getattr(artifact, property_name), text_output)