diff --git a/admin_data_views/templatetags/admin_data_utils.py b/admin_data_views/templatetags/admin_data_utils.py index 95ef5e2..4b73992 100644 --- a/admin_data_views/templatetags/admin_data_utils.py +++ b/admin_data_views/templatetags/admin_data_utils.py @@ -67,7 +67,7 @@ def add_help_text(fields: NestedDict, help_texts: NestedDict) -> dict[str, DictI elif isinstance(value, list): values = [] for item in value: - if not isinstance(item, (dict, list)): + if not isinstance(item, dict | list): values.append((item, "")) else: res = add_help_text(item, {} if isinstance(help_text, str) else help_text) diff --git a/admin_data_views/typing.py b/admin_data_views/typing.py index 2962483..b09b762 100644 --- a/admin_data_views/typing.py +++ b/admin_data_views/typing.py @@ -1,7 +1,7 @@ from __future__ import annotations -from collections.abc import ItemsView -from typing import Any, Callable, NamedTuple, TypedDict, Union +from collections.abc import Callable, ItemsView +from typing import Any, NamedTuple, TypedDict, Union try: from typing import NotRequired