mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-05 08:00:27 +00:00
![]() ## Summary Part of: https://github.com/astral-sh/ty/issues/868 This PR adds a heuristic to avoid argument type expansion if it's going to eventually lead to no matching overload. This is done by checking whether the non-expandable argument types are assignable to the corresponding annotated parameter type. If one of them is not assignable to all of the remaining overloads, then argument type expansion isn't going to help. ## Test Plan Add mdtest that would otherwise take a long time because of the number of arguments that it would need to expand (30). |
||
---|---|---|
.. | ||
annotation.md | ||
builtins.md | ||
callable_instance.md | ||
constructor.md | ||
dunder.md | ||
dunder_import.md | ||
function.md | ||
getattr_static.md | ||
invalid_syntax.md | ||
methods.md | ||
never.md | ||
overloads.md | ||
replace.md | ||
str_startswith.md | ||
subclass_of.md | ||
union.md |