Skip to content

Commit

Permalink
revert bac to __annotations__
Browse files Browse the repository at this point in the history
  • Loading branch information
InvincibleRMC committed Dec 5, 2024
1 parent 10d7b05 commit 6dff59f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions include/pybind11/pytypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -2567,13 +2567,7 @@ str_attr_accessor object_api<D>::doc() const {

template <typename D>
str_attr_accessor object_api<D>::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
// Create dict automatically
if (!isinstance<dict>(annotations_dict)) {
annotations_dict = dict();
Expand Down

0 comments on commit 6dff59f

Please sign in to comment.