Skip to content

Commit

Permalink
Python compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed May 22, 2024
1 parent 082f601 commit eebe0cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/assert_type/db/models/check_enums.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Literal
from typing import Literal, List, Tuple

from django.db.models import IntegerChoices, TextChoices
from django.utils.translation import gettext_lazy as _
Expand Down Expand Up @@ -40,7 +40,7 @@ class MyTextChoices(TextChoices):

# Assertions related to the metaclass:

assert_type(MyIntegerChoices.values, list[int])
assert_type(MyIntegerChoices.choices, list[tuple[int, str]])
assert_type(MyTextChoices.values, list[str])
assert_type(MyTextChoices.choices, list[tuple[str, str]])
assert_type(MyIntegerChoices.values, List[int])
assert_type(MyIntegerChoices.choices, List[Tuple[int, str]])
assert_type(MyTextChoices.values, List[str])
assert_type(MyTextChoices.choices, List[Tuple[str, str]])

0 comments on commit eebe0cf

Please sign in to comment.