Skip to content

Commit 13af637

Browse files
authored
fix(types): Use Union instead of | for some types
Refs #744
1 parent ec886d6 commit 13af637

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modeltranslation/_typing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import sys
4-
from typing import Literal, TypeVar
4+
from typing import Literal, TypeVar, Union
55

66
from django.contrib import admin
77
from django.contrib.admin.options import BaseModelAdmin
@@ -16,7 +16,7 @@
1616
_K = TypeVar("_K")
1717

1818
# See https://github.com/typeddjango/django-stubs/blob/082955/django-stubs/utils/datastructures.pyi#L12-L14
19-
_ListOrTuple: TypeAlias = "list[_K] | tuple[_K, ...]"
19+
_ListOrTuple: TypeAlias = Union[list[_K], tuple[_K, ...]]
2020

2121

2222
# https://github.com/typeddjango/django-stubs/tree/master/django_stubs_ext

0 commit comments

Comments
 (0)