From 0b984334d99103d1ac82467558f6f7f491e38d49 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 14 Nov 2023 12:59:19 -0800 Subject: [PATCH] Remove `CppTypePybind11()` wrapping for now. --- include/pybind11/pybind11.h | 2 +- tests/test_exceptions.py | 2 +- tests/test_numpy_dtypes.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index b8f3224ae..33ad041fd 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -494,7 +494,7 @@ protected: } else { std::string tname(t->name()); detail::clean_type_id(tname); - signature += "Annotated[Any, CppTypePybind11(\"" + tname + "\")]"; + signature += "Annotated[Any, \"" + tname + "\"]"; } } else { signature += c; diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index da35a74f0..336754ca1 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -424,4 +424,4 @@ def test_fn_cast_int_exception(): def test_return_exception_void(): with pytest.raises(TypeError) as excinfo: m.return_exception_void() - assert 'Annotated[Any, CppTypePybind11("exception")]' in str(excinfo.value) + assert 'Annotated[Any, "exception"]' in str(excinfo.value) diff --git a/tests/test_numpy_dtypes.py b/tests/test_numpy_dtypes.py index 9f9582e1f..7653c770b 100644 --- a/tests/test_numpy_dtypes.py +++ b/tests/test_numpy_dtypes.py @@ -343,7 +343,7 @@ def test_complex_array(): def test_signature(doc): assert ( doc(m.create_rec_nested) == "create_rec_nested(arg0: int) " - '-> numpy.ndarray[Annotated[Any, CppTypePybind11("NestedStruct")]]' + '-> numpy.ndarray[Annotated[Any, "NestedStruct"]]' )