File tree 4 files changed +27
-27
lines changed
4 files changed +27
-27
lines changed Original file line number Diff line number Diff line change @@ -272,14 +272,15 @@ extern "C" {
272
272
} \
273
273
}
274
274
275
- #define PYBIND11_CATCH_INIT_EXCEPTIONS \
276
- catch (pybind11::error_already_set &e) { \
277
- PyErr_SetString (PyExc_ImportError, e.what ()); \
278
- return nullptr ; \
279
- } catch (const std::exception &e) { \
280
- PyErr_SetString (PyExc_ImportError, e.what ()); \
281
- return nullptr ; \
282
- } \
275
+ #define PYBIND11_CATCH_INIT_EXCEPTIONS \
276
+ catch (pybind11::error_already_set & e) { \
277
+ PyErr_SetString (PyExc_ImportError, e.what ()); \
278
+ return nullptr ; \
279
+ } \
280
+ catch (const std::exception &e) { \
281
+ PyErr_SetString (PyExc_ImportError, e.what ()); \
282
+ return nullptr ; \
283
+ }
283
284
284
285
// clang-format off
285
286
/* * \rst
Original file line number Diff line number Diff line change @@ -134,7 +134,6 @@ class pythonbuf : public std::streambuf {
134
134
135
135
PYBIND11_NAMESPACE_END (detail)
136
136
137
-
138
137
// clang-format off
139
138
/* * \rst
140
139
This a move-only guard that redirects output.
@@ -184,7 +183,6 @@ class scoped_ostream_redirect {
184
183
scoped_ostream_redirect &operator =(scoped_ostream_redirect &&) = delete ;
185
184
};
186
185
187
-
188
186
// clang-format off
189
187
/* * \rst
190
188
Like `scoped_ostream_redirect`, but redirects cerr by default. This class
Original file line number Diff line number Diff line change 8
8
9
9
#if defined(_MSC_VER) && _MSC_VER < 1910
10
10
// We get some really long type names here which causes MSVC 2015 to emit warnings
11
- # pragma warning(disable: 4503) // warning C4503: decorated name length exceeded, name was truncated
11
+ # pragma warning( \
12
+ disable : 4503 ) // warning C4503: decorated name length exceeded, name was truncated
12
13
#endif
13
14
14
15
namespace py = pybind11;
Original file line number Diff line number Diff line change @@ -259,22 +259,22 @@ TEST_SUBMODULE(pytypes, m) {
259
259
m.def (" convert_to_pybind11_str" , [](py::object o) { return py::str (o); });
260
260
261
261
m.def (" nonconverting_constructor" ,
262
- // NOLINTNEXTLINE(performance-unnecessary-value-param)
263
- [](std::string type, py::object value, bool move) -> py::object {
264
- if (type == " bytes" ) {
265
- return move ? py::bytes (std::move (value)) : py::bytes (value);
266
- }
267
- if (type == " none" ) {
268
- return move ? py::none (std::move (value)) : py::none (value);
269
- }
270
- if (type == " ellipsis" ) {
271
- return move ? py::ellipsis (std::move (value)) : py::ellipsis (value);
272
- }
273
- if (type == " type" ) {
274
- return move ? py::type (std::move (value)) : py::type (value);
275
- }
276
- throw std::runtime_error (" Invalid type" );
277
- });
262
+ // NOLINTNEXTLINE(performance-unnecessary-value-param)
263
+ [](std::string type, py::object value, bool move) -> py::object {
264
+ if (type == " bytes" ) {
265
+ return move ? py::bytes (std::move (value)) : py::bytes (value);
266
+ }
267
+ if (type == " none" ) {
268
+ return move ? py::none (std::move (value)) : py::none (value);
269
+ }
270
+ if (type == " ellipsis" ) {
271
+ return move ? py::ellipsis (std::move (value)) : py::ellipsis (value);
272
+ }
273
+ if (type == " type" ) {
274
+ return move ? py::type (std::move (value)) : py::type (value);
275
+ }
276
+ throw std::runtime_error (" Invalid type" );
277
+ });
278
278
279
279
m.def (" get_implicit_casting" , []() {
280
280
py::dict d;
You can’t perform that action at this time.
0 commit comments