style: pre-commit fixes

This commit is contained in:
pre-commit-ci[bot] 2024-12-08 19:36:56 +00:00
parent 1571d52a18
commit 07f861382e

View File

@ -2569,7 +2569,7 @@ str_attr_accessor object_api<D>::doc() const {
template <typename D> template <typename D>
object object_api<D>::annotations() const { object object_api<D>::annotations() const {
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 9 #if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 9
// https://docs.python.org/3/howto/annotations.html#accessing-the-annotations-dict-of-an-object-in-python-3-9-and-older // https://docs.python.org/3/howto/annotations.html#accessing-the-annotations-dict-of-an-object-in-python-3-9-and-older
if (!hasattr(derived(), "__annotations__")) { if (!hasattr(derived(), "__annotations__")) {
setattr(derived(), "__annotations__", dict()); setattr(derived(), "__annotations__", dict());
} }