Skip to content

Commit

Permalink
Change was_not_added_error_message() based on feedback from @metzen
Browse files Browse the repository at this point in the history
  • Loading branch information
rwgk committed Apr 19, 2024
1 parent 8ce04ee commit f3b8a03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/pybind11/detail/native_enum_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class native_enum_data {
std::string was_not_added_error_message() const {
return "`native_enum` was not added to any module."
" Use e.g. `m += native_enum<...>(\""
+ enum_name_encoded + "\", py::native_enum_kind::IntEnum)` to fix.";
+ enum_name_encoded + "\", ...)` to fix.";
}

#if !defined(NDEBUG)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_native_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def test_native_enum_data_was_not_added_error_message():
msg = m.native_enum_data_was_not_added_error_message("Fake")
assert msg == (
"`native_enum` was not added to any module."
' Use e.g. `m += native_enum<...>("Fake", py::native_enum_kind::IntEnum)` to fix.'
' Use e.g. `m += native_enum<...>("Fake", ...)` to fix.'
)


Expand Down

0 comments on commit f3b8a03

Please sign in to comment.