Skip to content

Commit

Permalink
use python3.8 Tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
InvincibleRMC committed Jul 22, 2024
1 parent 82ff3c2 commit e2d5aa8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mypy/test/teststubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import tempfile
import unittest
from types import ModuleType
from typing import Any, TypeVar, cast
from typing import Any, Tuple, TypeVar, cast
from typing_extensions import ParamSpec, TypeVarTuple

import pytest
Expand Down Expand Up @@ -623,13 +623,13 @@ def test_generate_inline_generic(self) -> None:
TBoundTuple = TypeVar("TBoundTuple", int, str)
assert generate_inline_generic((TBoundTuple,)) == "[TBoundTuple: (int, str)]"
P = ParamSpec("P")
p_tuple = cast(tuple[ParamSpec], (P,))
p_tuple = cast(Tuple[ParamSpec], (P,))
assert generate_inline_generic(p_tuple) == "[**P]"
U = TypeVarTuple("U")
u_tuple = cast(tuple[TypeVarTuple], (U,))
u_tuple = cast(Tuple[TypeVarTuple], (U,))
assert generate_inline_generic(u_tuple) == "[*U]"
all_tuple = cast(
tuple[TypeVar, TypeVar, TypeVar, ParamSpec, TypeVarTuple],
Tuple[TypeVar, TypeVar, TypeVar, ParamSpec, TypeVarTuple],
(T, TBound, TBoundTuple, P, U),
)
assert (
Expand Down

0 comments on commit e2d5aa8

Please sign in to comment.