ruff
80a58e23 - [ty] Limit fixed-length tuple expansion in overload matching (#23190)

Commit
20 days ago
[ty] Limit fixed-length tuple expansion in overload matching (#23190) ## Summary When resolving overloaded calls, ty expands tuple arguments via Cartesian product as required by the [spec](https://typing.python.org/en/latest/spec/overload.html#argument-type-expansion). This PR adjusts our behavior to match [pyright](https://github.com/microsoft/pyright/blob/5a325e4874e775436671eed65ad696787a1ef74b/packages/pyright-internal/src/analyzer/typeEvaluator.ts#L570), which limits to 64 types for a single tuple and 256 across. (As-is, we only applied a 512 limit _after_ expanding.) Closes https://github.com/astral-sh/ty/issues/1870.
Author
Parents
Loading