ruff
40a0e02c - [ty] Fix call argument validation for variadic parameters (#30086)

Commit
5 days ago
[ty] Fix call argument validation for variadic parameters (#30086) Fixes a small bug in argument validation involving variadic parameter types where we sometimes use the type inferred without type context rather than the type inferred against the parameter: ```py @overload def pair[T: int, U](*args: *tuple[list[T], list[U]]) -> tuple[T, U]: ... @overload def pair(first: list[str], second: list[int], /) -> tuple[str, int]: ... def pair(*args: object) -> object: raise NotImplementedError reveal_type(pair([42], ["x"])) # main: tuple[Unknown, Unknown], now: tuple[int, str] ```
Author
Parents
Loading