Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Nov 4, 2024
1 parent 687416e commit d3b16d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cobaya/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ def get_annotations(cls) -> InfoDict:
if issubclass(base, HasDefaults) and base is not HasDefaults:
d.update(base.get_annotations())

# from Python 10 should use just cls.__annotations__
d.update({k: v for k, v in cls.__dict__.get("__annotations__", {}).items()
if not k.startswith('_')})
return d
Expand Down

0 comments on commit d3b16d1

Please sign in to comment.