Skip to content

Commit

Permalink
Fix module type hint
Browse files Browse the repository at this point in the history
"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
  • Loading branch information
gentlegiantJGC committed Dec 16, 2024
1 parent 741d86f commit f828826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/pybind11/pybind11.h
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ PYBIND11_NAMESPACE_BEGIN(detail)

template <>
struct handle_type_name<module_> {
static constexpr auto name = const_name("module");
static constexpr auto name = const_name("types.ModuleType");
};

PYBIND11_NAMESPACE_END(detail)
Expand Down

0 comments on commit f828826

Please sign in to comment.