Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Dec 6, 2024
1 parent e5235f0 commit 639b192
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/pybind11/pytypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -2569,10 +2569,9 @@ template <typename D>
// Always a dict
// 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 {
if (isinstance<type>(derived())){
if (isinstance<type>(derived())) {
return getattr(getattr(derived(), "__dict__"), "__annotations__", dict());
}
else{
} else {
return getattr(derived(), "__annotations__", dict());
}
}
Expand Down

0 comments on commit 639b192

Please sign in to comment.