style: pre-commit fixes

This commit is contained in:
pre-commit-ci[bot] 2022-11-02 14:29:06 +00:00
parent 8df2e819d2
commit f4e6c7833e

View File

@ -173,9 +173,11 @@ bool has_pybind11_internals_builtin() {
#if PY_VERSION_HEX < 0x03080000
state_dict = py::reinterpret_borrow<py::dict>(PyEval_GetBuiltins());
#elif PY_VERSION_HEX < 0x03090000
state_dict = py::reinterpret_borrow<py::dict>(PyInterpreterState_GetDict(_PyInterpreterState_Get()));
state_dict
= py::reinterpret_borrow<py::dict>(PyInterpreterState_GetDict(_PyInterpreterState_Get()));
#else
state_dict = py::reinterpret_borrow<py::dict>(PyInterpreterState_GetDict(PyInterpreterState_Get()));
state_dict
= py::reinterpret_borrow<py::dict>(PyInterpreterState_GetDict(PyInterpreterState_Get()));
#endif
return state_dict.contains(PYBIND11_INTERNALS_ID);
};