spdx_tools.spdx3.writer.console.ai.ai_package_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.ai import AIPackage
 7from spdx_tools.spdx3.writer.console.console import write_value
 8from spdx_tools.spdx3.writer.console.software.package_writer import write_package
 9
10
11def write_ai_package(ai_package: AIPackage, text_output: TextIO):
12    text_output.write("## AI Package\n")
13    write_package(ai_package, text_output, False)
14
15    for property_name in AIPackage.__annotations__.keys():
16        write_value(property_name, getattr(ai_package, property_name), text_output)
def write_ai_package( ai_package: spdx_tools.spdx3.model.ai.ai_package.AIPackage, text_output: <class 'TextIO'>):
12def write_ai_package(ai_package: AIPackage, text_output: TextIO):
13    text_output.write("## AI Package\n")
14    write_package(ai_package, text_output, False)
15
16    for property_name in AIPackage.__annotations__.keys():
17        write_value(property_name, getattr(ai_package, property_name), text_output)