We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3c85ffc + c5ed9d4 commit 449f413Copy full SHA for 449f413
2 files changed
include/pybind11/pybind11.h
@@ -1324,7 +1324,7 @@ PYBIND11_NAMESPACE_BEGIN(detail)
1324
1325
template <>
1326
struct handle_type_name<module_> {
1327
- static constexpr auto name = const_name("module");
+ static constexpr auto name = const_name("types.ModuleType");
1328
};
1329
1330
PYBIND11_NAMESPACE_END(detail)
tests/test_modules.py
@@ -81,6 +81,13 @@ def test_pydoc():
81
assert pydoc.text.docmodule(pybind11_tests)
82
83
84
+def test_module_handle_type_name():
85
+ assert (
86
+ m.def_submodule.__doc__
87
+ == "def_submodule(arg0: types.ModuleType, arg1: str) -> types.ModuleType\n"
88
+ )
89
+
90
91
def test_duplicate_registration():
92
"""Registering two things with the same name"""
93
0 commit comments