ruff
7dd0c7f4 - [red-knot] Infer `tuple` types from annotations (#13943)

Commit
1 year ago
[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).
Author
Parents
Loading