spdx_tools.spdx3.writer.console.lifecycle_scoped_relationship_writer
1# SPDX-FileCopyrightText: 2023 spdx contributors 2# 3# SPDX-License-Identifier: Apache-2.0 4 5from beartype.typing import TextIO 6 7from spdx_tools.spdx3.model import LifecycleScopedRelationship 8from spdx_tools.spdx3.writer.console.console import write_value 9from spdx_tools.spdx3.writer.console.relationship_writer import write_relationship 10 11 12def write_lifecycle_scoped_relationship( 13 relationship: LifecycleScopedRelationship, text_output: TextIO, heading: bool = True 14): 15 if heading: 16 text_output.write("## LifecycleScopedRelationship\n") 17 write_relationship(relationship, text_output, heading=False) 18 19 for property_name in LifecycleScopedRelationship.__annotations__.keys(): 20 write_value(property_name, getattr(relationship, property_name), text_output)
def
write_lifecycle_scoped_relationship( relationship: spdx_tools.spdx3.model.lifecycle_scoped_relationship.LifecycleScopedRelationship, text_output: <class 'TextIO'>, heading: bool = True):
13def write_lifecycle_scoped_relationship( 14 relationship: LifecycleScopedRelationship, text_output: TextIO, heading: bool = True 15): 16 if heading: 17 text_output.write("## LifecycleScopedRelationship\n") 18 write_relationship(relationship, text_output, heading=False) 19 20 for property_name in LifecycleScopedRelationship.__annotations__.keys(): 21 write_value(property_name, getattr(relationship, property_name), text_output)