From 10d7b05ec4c826bf69e69cd1264f45631fa64733 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:21:14 +0000 Subject: [PATCH] style: pre-commit fixes --- include/pybind11/pytypes.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index ee8cc82bf..3c543044d 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -2569,11 +2569,11 @@ template str_attr_accessor object_api::annotations() const { // Create dict automatically - #if !defined(PYPY_VERSION) && PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 9 - str_attr_accessor annotations_dict = attr("__dict__").attr("__annotations__"); - #else - str_attr_accessor annotations_dict = attr("__annotations__"); - #endif +#if !defined(PYPY_VERSION) && PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 9 + str_attr_accessor annotations_dict = attr("__dict__").attr("__annotations__"); +#else + str_attr_accessor annotations_dict = attr("__annotations__"); +#endif // Create dict automatically if (!isinstance(annotations_dict)) { annotations_dict = dict();