ruff/crates/red_knot_python_semantic/resources/mdtest/assignment
Alex Waygood 7dd0c7f4bd
[red-knot] Infer tuple types from annotations (#13943)
## Summary

This PR adds support for heterogenous `tuple` annotations to red-knot.

It does the following:
- Extends `infer_type_expression` so that it understands tuple
annotations
- Changes `infer_type_expression` so that `ExprStarred` nodes in type
annotations are inferred as `Todo` rather than `Unknown` (they're valid
in PEP-646 tuple annotations)
- Extends `Type::is_subtype_of` to understand when one heterogenous
tuple type can be understood to be a subtype of another (without this
change, the PR would have introduced new false-positive errors to some
existing mdtests).
2024-10-29 10:30:03 +00:00
..
annotations.md [red-knot] Infer tuple types from annotations (#13943) 2024-10-29 10:30:03 +00:00
multi_target.md [red-knot] Port type inference tests to new test framework (#13719) 2024-10-15 11:23:46 -07:00
unbound.md [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
walrus.md [red-knot] Port type inference tests to new test framework (#13719) 2024-10-15 11:23:46 -07:00