mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 07:02:11 +00:00
Merge branch 'master' into smart_holder
This commit is contained in:
commit
a5ec28ffe8
@ -43,7 +43,7 @@ repos:
|
||||
|
||||
# Black, the code formatter, natively supports pre-commit
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 21.8b0
|
||||
rev: 21.9b0
|
||||
hooks:
|
||||
- id: black
|
||||
# By default, this ignores pyi files, though black supports them
|
||||
|
@ -82,8 +82,9 @@ TEST_SUBMODULE(class_, m) {
|
||||
.def_static("new_instance", &NoConstructor::new_instance, "Return an instance");
|
||||
|
||||
py::class_<NoConstructorNew>(m, "NoConstructorNew")
|
||||
.def(py::init([](NoConstructorNew *self) { return self; })) // Need a NOOP __init__
|
||||
.def_static("__new__", [](const py::object *) { return NoConstructorNew::new_instance(); } );
|
||||
.def(py::init([](const NoConstructorNew &self) { return self; })) // Need a NOOP __init__
|
||||
.def_static("__new__",
|
||||
[](const py::object &) { return NoConstructorNew::new_instance(); });
|
||||
|
||||
// test_inheritance
|
||||
class Pet {
|
||||
|
Loading…
Reference in New Issue
Block a user