From b8ad03da76ea64e9fc37ff1ff399f486f2484ad1 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Thu, 5 Dec 2024 16:11:24 -0500 Subject: [PATCH] remove stdmove --- include/pybind11/pytypes.h | 3 +-- tests/test_pytypes.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index cb77cc8184..2e871ed4b3 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -2568,8 +2568,7 @@ str_attr_accessor object_api::doc() const { template // Always a dict object object_api::annotations() const { - dict annotations_dict = getattr(derived(), "__annotations__", dict()); - return std::move(annotations_dict); + return getattr(derived(), "__annotations__", dict()); } template diff --git a/tests/test_pytypes.py b/tests/test_pytypes.py index 9db6a36fe3..40cba7c8e7 100644 --- a/tests/test_pytypes.py +++ b/tests/test_pytypes.py @@ -1104,6 +1104,7 @@ def test_dict_ranges(tested_dict, expected): def get_annotations_helper(o): + print(help(o)) return getattr(o, "__annotations__", None)