Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: reporting the attribute who lost their value #225

Merged
merged 5 commits into from
Nov 11, 2023
Merged
Changes from 1 commit
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: 2 additions & 0 deletions src/griffe/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ def _attribute_incompatibilities(old_attribute: Attribute, new_attribute: Attrib
# if old_attribute.annotation is not None and new_attribute.annotation is not None:
# if not is_subhint(new_attribute.annotation, old_attribute.annotation):
if old_attribute.value != new_attribute.value:
if new_attribute.value is None:
new_attribute.value = "unset"
yield AttributeChangedValueBreakage(new_attribute, old_attribute.value, new_attribute.value)


Expand Down