Skip to content

relationship_writer: properly access __annotations__ dict #858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/spdx_tools/spdx3/writer/console/relationship_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ def write_relationship(relationship: Relationship, text_output: TextIO, heading:
if heading:
text_output.write("## Relationship\n")
write_element_properties(relationship, text_output)
for property_name in relationship.__annotations__.keys():
for property_name in type(relationship).__annotations__.keys():
write_value(property_name, getattr(relationship, property_name), text_output)