Logo
Explore Help
Sign In
Cyclic0007/ruff
1
0
Fork 0
You've already forked ruff
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
amy/ruffen-docs
ruff/crates/ty_python_semantic/resources/mdtest/narrow/conditionals
History
Charlie Marsh 664686bdbc [ty] Exclude parameterized tuple types from narrowing when disjoint from comparison values (#22129)
## Summary

IIUC, tuples with a known structure (`tuple_spec`) use the standard
tuple `__eq__` which only returns `True` for other tuples, so they can
be safely excluded when disjoint from string literals or other non-tuple
types.

Closes https://github.com/astral-sh/ty/issues/2140.
2025-12-22 20:44:49 +00:00
..
boolean.md
[ty] Reachability constraints (#18621)
2025-06-17 09:24:28 +02:00
elif_else.md
[ty] Improve disjointness inference for NominalInstanceTypes and SubclassOfTypes (#18864)
2025-06-24 20:27:37 +00:00
eq.md
[ty] Exclude parameterized tuple types from narrowing when disjoint from comparison values (#22129)
2025-12-22 20:44:49 +00:00
in.md
[ty] Exclude parameterized tuple types from narrowing when disjoint from comparison values (#22129)
2025-12-22 20:44:49 +00:00
is_not.md
[ty] Expansion of enums into unions of literals (#19382)
2025-07-21 19:37:55 +02:00
is.md
[ty] Expansion of enums into unions of literals (#19382)
2025-07-21 19:37:55 +02:00
nested.md
[ty] Use declared variable types as bidirectional type context (#20796)
2025-10-16 15:40:39 -04:00
not.md
…
Powered by Gitea Version: 1.25.3 Page: 3947ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API