Closed
Description
The task is to raise a invalid-type-form
error that states "Invalid type expression" for the following three literal types:
ruff/crates/red_knot_python_semantic/src/types/infer.rs
Lines 5661 to 5666 in 44aec36
The reason is that those literal types are handled appropriately in the relevant context like typing.Literal
, typing.Annotated
.
This will also require fixing / updating the tests w.r.t. this change.