Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix type error for Python 3.8 #754

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading