Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jul 26, 2024
1 parent c6ba82c commit 960d4bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 1 addition & 3 deletions include/pybind11/typing.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ class TypeVar : public object {
class NameWrapper : public object {
PYBIND11_OBJECT_DEFAULT(TypeVarObject, object, PyObject_Type)
using object::object;
NameWrapper(const char *name){
attr("__name__") = name;
}
NameWrapper(const char *name) { attr("__name__") = name; }
}

template <typename T>
Expand Down
12 changes: 7 additions & 5 deletions tests/test_pytypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,14 +925,16 @@ TEST_SUBMODULE(pytypes, m) {
#endif

struct TypeVarObject {};
py::class_<TypeVarObject>(m, "TypeVarObject").type_params() = py::make_tuple(py::typing::TypeVarObject<int>("T"));

py::class_<TypeVarObject>(m, "TypeVarObject").type_params()
= py::make_tuple(py::typing::TypeVarObject<int>("T"));

struct ParamSpec {};
py::class_<ParamSpec>(m, "ParamSpec").type_params() = py::make_tuple(py::typing::ParamSpec("P"));
py::class_<ParamSpec>(m, "ParamSpec").type_params()
= py::make_tuple(py::typing::ParamSpec("P"));

struct TypeVarTuple {};
py::class_<TypeVarTuple>(m, "TypeVarTuple").type_params() = py::make_tuple(py::typing::TypeVarTuple("T"));

py::class_<TypeVarTuple>(m, "TypeVarTuple").type_params()
= py::make_tuple(py::typing::TypeVarTuple("T"));

struct NoTypeParams {};
struct TypeParams {};
Expand Down

0 comments on commit 960d4bc

Please sign in to comment.