mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-31 15:20:34 +00:00
style: pre-commit fixes
This commit is contained in:
parent
c38836a803
commit
9e43986018
@ -1102,13 +1102,14 @@ def test_dict_ranges(tested_dict, expected):
|
||||
assert m.dict_iterator_default_initialization()
|
||||
assert m.transform_dict_plus_one(tested_dict) == expected
|
||||
|
||||
|
||||
def get_annotations_helper(o):
|
||||
# Taken from __annotations__ docs
|
||||
# https://docs.python.org/3/howto/annotations.html#accessing-the-annotations-dict-of-an-object-in-python-3-9-and-older
|
||||
if isinstance(o, type):
|
||||
ann = o.__dict__.get('__annotations__', None)
|
||||
ann = o.__dict__.get("__annotations__", None)
|
||||
else:
|
||||
ann = getattr(o, '__annotations__', None)
|
||||
ann = getattr(o, "__annotations__", None)
|
||||
return ann
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user