style: pre-commit fixes

This commit is contained in:
pre-commit-ci[bot] 2024-12-15 20:47:10 +00:00
parent 14d2dda5eb
commit 881b356ce8
2 changed files with 2 additions and 2 deletions

View File

@ -1049,7 +1049,8 @@ TEST_SUBMODULE(pytypes, m) {
auto point = py::class_<Point>(m, "Point"); auto point = py::class_<Point>(m, "Point");
point.def(py::init()); point.def(py::init());
point.attr_with_type_hint<py::typing::ClassVar<float>>("x"); point.attr_with_type_hint<py::typing::ClassVar<float>>("x");
point.attr_with_type_hint<py::typing::ClassVar<py::typing::Dict<py::str, int>>>("dict_str_int") = py::dict(); point.attr_with_type_hint<py::typing::ClassVar<py::typing::Dict<py::str, int>>>("dict_str_int")
= py::dict();
m.attr_with_type_hint<py::typing::Final<int>>("CONST_INT") = 3; m.attr_with_type_hint<py::typing::Final<int>>("CONST_INT") = 3;
m.attr("defined_PYBIND11_CPP17") = true; m.attr("defined_PYBIND11_CPP17") = true;

View File

@ -1143,7 +1143,6 @@ def test_class_attribute_types() -> None:
assert m.Point().dict_str_int == {"hi": 3} assert m.Point().dict_str_int == {"hi": 3}
@pytest.mark.skipif( @pytest.mark.skipif(
not m.defined_PYBIND11_CPP17, not m.defined_PYBIND11_CPP17,
reason="C++17 Position Independent Code not available", reason="C++17 Position Independent Code not available",