Skip to content

Commit

Permalink
fix: Fix type error for Python 3.8 (#754)
Browse files Browse the repository at this point in the history
Closes #753
  • Loading branch information
last-partizan authored Aug 13, 2024
1 parent 6fdcdfe commit 5cc37c2
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, Union
from typing import Literal, TypeVar

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 = Union[list[_K], tuple[_K, ...]]
_ListOrTuple: TypeAlias = "list[_K] | tuple[_K, ...]"


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

0 comments on commit 5cc37c2

Please sign in to comment.