ruff/crates/red_knot_python_semantic/resources/mdtest/literal
David Peter d81b6cd334
[red-knot] Types for subexpressions of annotations (#14426)
## Summary

This patches up various missing paths where sub-expressions of type
annotations previously had no type attached. Examples include:
```py
tuple[int, str]
#     ~~~~~~~~

type[MyClass]
#    ~~~~~~~

Literal["foo"]
#       ~~~~~

Literal["foo", Literal[1, 2]]
#              ~~~~~~~~~~~~~

Literal[1, "a", random.illegal(sub[expr + ession])]
#               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

## Test Plan

```
cargo nextest run -p red_knot_workspace -- --ignored linter_af linter_gz
```
2024-11-18 13:03:27 +01:00
..
collections [red-knot] Autoformat mdtest Python snippets using blacken-docs (#13809) 2024-10-19 15:57:06 +01:00
boolean.md [red-knot] mdtest suite: formatting and cleanup (#13806) 2024-10-18 11:07:53 +02:00
bytes.md [red-knot] Infer subscript expression types for bytes literals (#13901) 2024-10-24 12:07:41 +02:00
complex.md [red-knot] Port type inference tests to new test framework (#13719) 2024-10-15 11:23:46 -07:00
f_string.md [red-knot] Autoformat mdtest Python snippets using blacken-docs (#13809) 2024-10-19 15:57:06 +01:00
float.md [red-knot] Port type inference tests to new test framework (#13719) 2024-10-15 11:23:46 -07:00
integer.md [red-knot] Port type inference tests to new test framework (#13719) 2024-10-15 11:23:46 -07:00
literal.md [red-knot] Types for subexpressions of annotations (#14426) 2024-11-18 13:03:27 +01:00
string.md [red-knot] Autoformat mdtest Python snippets using blacken-docs (#13809) 2024-10-19 15:57:06 +01:00