mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-28 13:52:46 +00:00
add dir
This commit is contained in:
parent
4d0968dea8
commit
e84df95bf2
@ -1105,6 +1105,7 @@ def test_dict_ranges(tested_dict, expected):
|
||||
|
||||
# https://docs.python.org/3/howto/annotations.html#accessing-the-annotations-dict-of-an-object-in-python-3-9-and-older
|
||||
def get_annotations_helper(o):
|
||||
dir(o)
|
||||
if isinstance(o, type):
|
||||
return o.__dict__.get("__annotations__", {})
|
||||
return getattr(o, "__annotations__", {})
|
||||
|
Loading…
Reference in New Issue
Block a user