From f828826a2437a97117f850c94e0d9bbbc54e8823 Mon Sep 17 00:00:00 2001 From: gentlegiantJGC Date: Mon, 16 Dec 2024 10:45:57 +0000 Subject: [PATCH] Fix module type hint "module" is not a valid python value. The correct type hint for a module object is "types.ModuleType" which has existed since at least Python 2.6 --- include/pybind11/pybind11.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 7fc7dbf723..4387c2754b 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1322,7 +1322,7 @@ PYBIND11_NAMESPACE_BEGIN(detail) template <> struct handle_type_name { - static constexpr auto name = const_name("module"); + static constexpr auto name = const_name("types.ModuleType"); }; PYBIND11_NAMESPACE_END(detail)