spdx_tools.spdx3.writer.console.annotation_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 Annotation 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_annotation(annotation: Annotation, text_output: TextIO): 12 text_output.write("## Annotation\n") 13 write_element_properties(annotation, text_output) 14 15 for property_name in Annotation.__annotations__.keys(): 16 write_value(property_name, getattr(annotation, property_name), text_output)
def
write_annotation( annotation: spdx_tools.spdx3.model.annotation.Annotation, text_output: <class 'TextIO'>):
12def write_annotation(annotation: Annotation, text_output: TextIO): 13 text_output.write("## Annotation\n") 14 write_element_properties(annotation, text_output) 15 16 for property_name in Annotation.__annotations__.keys(): 17 write_value(property_name, getattr(annotation, property_name), text_output)