style: pre-commit fixes

This commit is contained in:
pre-commit-ci[bot] 2024-12-06 00:04:21 +00:00
parent e5235f00f7
commit 639b192658

View File

@ -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());
} }
} }