mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-28 22:02:43 +00:00
style: pre-commit fixes
This commit is contained in:
parent
e5235f00f7
commit
639b192658
@ -2569,10 +2569,9 @@ template <typename D>
|
|||||||
// Always a dict
|
// Always a dict
|
||||||
// https://docs.python.org/3/howto/annotations.html#accessing-the-annotations-dict-of-an-object-in-python-3-9-and-older
|
// https://docs.python.org/3/howto/annotations.html#accessing-the-annotations-dict-of-an-object-in-python-3-9-and-older
|
||||||
object object_api<D>::annotations() const {
|
object object_api<D>::annotations() const {
|
||||||
if (isinstance<type>(derived())){
|
if (isinstance<type>(derived())) {
|
||||||
return getattr(getattr(derived(), "__dict__"), "__annotations__", dict());
|
return getattr(getattr(derived(), "__dict__"), "__annotations__", dict());
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
return getattr(derived(), "__annotations__", dict());
|
return getattr(derived(), "__annotations__", dict());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user