Skip to content

Commit 491592b

Browse files
style: pre-commit fixes
1 parent 18be530 commit 491592b

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

include/pybind11/options.h

+11-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,15 @@ class options {
4747
return *this;
4848
}
4949

50-
options& disable_enum_members_docstring() & { global_state().show_enum_members_docstring = false; return *this; }
50+
options &disable_enum_members_docstring() & {
51+
global_state().show_enum_members_docstring = false;
52+
return *this;
53+
}
5154

52-
options& enable_enum_members_docstring() & { global_state().show_enum_members_docstring = true; return *this; }
55+
options &enable_enum_members_docstring() & {
56+
global_state().show_enum_members_docstring = true;
57+
return *this;
58+
}
5359

5460
// Getter methods (return the global state):
5561

@@ -59,7 +65,9 @@ class options {
5965

6066
static bool show_function_signatures() { return global_state().show_function_signatures; }
6167

62-
static bool show_enum_members_docstring() { return global_state().show_enum_members_docstring; }
68+
static bool show_enum_members_docstring() {
69+
return global_state().show_enum_members_docstring;
70+
}
6371

6472
// This type is not meant to be allocated on the heap.
6573
void *operator new(size_t) = delete;

include/pybind11/pybind11.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,8 @@ struct enum_base {
19811981
std::string docstring;
19821982
dict entries = arg.attr("__entries");
19831983
if (((PyTypeObject *) arg.ptr())->tp_doc) {
1984-
docstring += std::string(((PyTypeObject *) arg.ptr())->tp_doc) + "\n\n";
1984+
docstring
1985+
+= std::string(((PyTypeObject *) arg.ptr())->tp_doc) + "\n\n";
19851986
}
19861987
docstring += "Members:";
19871988
for (auto kv : entries) {

0 commit comments

Comments
 (0)