From 9e439860187567bd7544a97ecc287c9aec39b949 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:02:54 +0000 Subject: [PATCH] style: pre-commit fixes --- tests/test_pytypes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_pytypes.py b/tests/test_pytypes.py index 53d5b03cf..2a3ac3251 100644 --- a/tests/test_pytypes.py +++ b/tests/test_pytypes.py @@ -1102,13 +1102,14 @@ def test_dict_ranges(tested_dict, expected): assert m.dict_iterator_default_initialization() assert m.transform_dict_plus_one(tested_dict) == expected + def get_annotations_helper(o): # Taken from __annotations__ docs # https://docs.python.org/3/howto/annotations.html#accessing-the-annotations-dict-of-an-object-in-python-3-9-and-older if isinstance(o, type): - ann = o.__dict__.get('__annotations__', None) + ann = o.__dict__.get("__annotations__", None) else: - ann = getattr(o, '__annotations__', None) + ann = getattr(o, "__annotations__", None) return ann