mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 21:25:13 +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
|
# Black, the code formatter, natively supports pre-commit
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 21.8b0
|
rev: 21.9b0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
# By default, this ignores pyi files, though black supports them
|
# 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");
|
.def_static("new_instance", &NoConstructor::new_instance, "Return an instance");
|
||||||
|
|
||||||
py::class_<NoConstructorNew>(m, "NoConstructorNew")
|
py::class_<NoConstructorNew>(m, "NoConstructorNew")
|
||||||
.def(py::init([](NoConstructorNew *self) { return self; })) // Need a NOOP __init__
|
.def(py::init([](const NoConstructorNew &self) { return self; })) // Need a NOOP __init__
|
||||||
.def_static("__new__", [](const py::object *) { return NoConstructorNew::new_instance(); } );
|
.def_static("__new__",
|
||||||
|
[](const py::object &) { return NoConstructorNew::new_instance(); });
|
||||||
|
|
||||||
// test_inheritance
|
// test_inheritance
|
||||||
class Pet {
|
class Pet {
|
||||||
|
Loading…
Reference in New Issue
Block a user