From 639b192658a364a2ec89925230ebf439a7a01796 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:04:21 +0000 Subject: [PATCH] style: pre-commit fixes --- include/pybind11/pytypes.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 7fed214d43..b3996f9cf0 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -2569,10 +2569,9 @@ template // 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::annotations() const { - if (isinstance(derived())){ + if (isinstance(derived())) { return getattr(getattr(derived(), "__dict__"), "__annotations__", dict()); - } - else{ + } else { return getattr(derived(), "__annotations__", dict()); } }