Skip to content

Commit

Permalink
fix(types): Use Union instead of | for some types
Browse files Browse the repository at this point in the history
Refs #744
  • Loading branch information
mschoettle authored Jul 5, 2024
1 parent ec886d6 commit 13af637
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modeltranslation/_typing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import sys
from typing import Literal, TypeVar
from typing import Literal, TypeVar, Union

from django.contrib import admin
from django.contrib.admin.options import BaseModelAdmin
Expand All @@ -16,7 +16,7 @@
_K = TypeVar("_K")

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


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

0 comments on commit 13af637

Please sign in to comment.