@@ -210,7 +210,7 @@ def foo(a: int) -> None: ...
210210[case testExportDifferentTypes]
211211from __future__ import annotations
212212
213- from typing import Callable, Any, Literal
213+ from typing import Callable, Any, Literal, NoReturn
214214
215215list_ann: list[int]
216216any_ann: Any
@@ -220,6 +220,40 @@ callable_ann: Callable[[int], str]
220220type_type_ann: type[int]
221221literal_ann: Literal['x', 5, False]
222222
223+ def f() -> NoReturn:
224+ assert False
225+
226+ BadType = 1
227+ x: BadType # type: ignore
228+
229+ [builtins fixtures/tuple.pyi]
230+ [out]
231+ <not checked>
232+
233+ [case testExportGenericTypes]
234+ from __future__ import annotations
235+
236+ from typing import TypeVar, Callable
237+ from typing_extensions import TypeVarTuple, ParamSpec, Unpack, Concatenate
238+
239+ T = TypeVar("T")
240+
241+ def ident(x: T) -> T:
242+ return x
243+
244+ Ts = TypeVarTuple("Ts")
245+
246+ def ts(t: tuple[Unpack[Ts]]) -> tuple[Unpack[Ts]]:
247+ return t
248+
249+ P = ParamSpec("P")
250+
251+ def pspec(f: Callable[P, None], *args: P.args, **kwargs: P.kwargs) -> None:
252+ f(*args, **kwargs)
253+
254+ def concat(f: Callable[Concatenate[int, P], None], *args: P.args, **kwargs: P.kwargs) -> None:
255+ f(1, *args, **kwargs)
256+
223257[builtins fixtures/tuple.pyi]
224258[out]
225259<not checked>
@@ -228,7 +262,6 @@ literal_ann: Literal['x', 5, False]
228262import typing
229263
230264from typing import overload, TypeVar
231- from typing_extensions import TypeVarTuple, ParamSpec
232265
233266@overload
234267def f(x: int) -> int: ...
@@ -247,9 +280,6 @@ def foo(x: int) -> int: ...
247280X = int
248281x: X = 2
249282
250- Ts = TypeVarTuple("Ts")
251- P = ParamSpec("P")
252-
253283[builtins fixtures/tuple.pyi]
254284[out]
255285<not checked>
0 commit comments