We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec886d6 commit 13af637Copy full SHA for 13af637
modeltranslation/_typing.py
@@ -1,7 +1,7 @@
1
from __future__ import annotations
2
3
import sys
4
-from typing import Literal, TypeVar
+from typing import Literal, TypeVar, Union
5
6
from django.contrib import admin
7
from django.contrib.admin.options import BaseModelAdmin
@@ -16,7 +16,7 @@
16
_K = TypeVar("_K")
17
18
# See https://github.com/typeddjango/django-stubs/blob/082955/django-stubs/utils/datastructures.pyi#L12-L14
19
-_ListOrTuple: TypeAlias = "list[_K] | tuple[_K, ...]"
+_ListOrTuple: TypeAlias = Union[list[_K], tuple[_K, ...]]
20
21
22
# https://github.com/typeddjango/django-stubs/tree/master/django_stubs_ext
0 commit comments