Skip to content

Commit

Permalink
Update signature checker for property-getters
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Oct 15, 2024
1 parent 8fe0372 commit 475ed5b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/ci/python_check_signatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ def load_runtime_signatures(module_name: str) -> TotalSignature:
class_def[method_name] = inspect.signature(method_obj)
except Exception:
pass
# Get property getters
for method_name, method_obj in inspect.getmembers(
obj, lambda o: o.__class__.__name__ == "getset_descriptor"
):
class_def[method_name] = Signature(parameters=[Parameter("self", Parameter.POSITIONAL_ONLY)])
signatures[name] = class_def

return signatures
Expand Down

0 comments on commit 475ed5b

Please sign in to comment.