mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-06 11:48:39 +00:00
![]() ## Summary Support direct uses of `typing.TypeAliasType`, as in: ```py from typing import TypeAliasType IntOrStr = TypeAliasType("IntOrStr", int | str) def f(x: IntOrStr) -> None: reveal_type(x) # revealed: int | str ``` closes https://github.com/astral-sh/ty/issues/392 ## Ecosystem The new false positive here: ```diff + error[invalid-type-form] altair/utils/core.py:49:53: The first argument to `Callable` must be either a list of types, ParamSpec, Concatenate, or `...` ``` comes from the fact that we infer the second argument as a type expression now. We silence false positives for PEP695 `ParamSpec`s, but not for `P = ParamSpec("P")` inside `Callable[P, ...]`. ## Test Plan New Markdown tests |
||
---|---|---|
.. | ||
check.rs |