-
Notifications
You must be signed in to change notification settings - Fork 276
x: list[Annotated[()]] causes a panic #3179
Copy link
Copy link
Closed
astral-sh/ruff
#24303Labels
bugSomething isn't workingSomething isn't workingfatala fatal error (panic or crash)a fatal error (panic or crash)
Milestone
Description
Summary
from typing import Annotated
x: list[Annotated[()]]causes
error[panic]: Panicked at crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1577:26 when checking `/Users/alexw/dev/ruff/foo.py`: `assertion `left == right` failed
left: Some(Dynamic(Unknown))
right: None`
info: This indicates a bug in ty.
info: If you could open an issue at https://github.com/astral-sh/ty/issues/new?title=%5Bpanic%5D, we'd be very appreciative!
info: Platform: macos aarch64
info: Version: ruff/0.15.7+145 (7c236fae3 2026-03-30)
info: Args: ["target/debug/ty", "check", "foo.py", "--ignore=undefined-reveal", "--python-version=3.14"]
info: run with `RUST_BACKTRACE=1` environment variable to show the full backtrace information
info: query stacktrace:
0: infer_definition_types(Id(1401))
at crates/ty_python_semantic/src/types/infer.rs:72
1: infer_scope_types_impl(Id(1000))
at crates/ty_python_semantic/src/types/infer.rs:265
2: check_file_impl(Id(c00))
at crates/ty_project/src/lib.rs:617
### Version
_No response_
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfatala fatal error (panic or crash)a fatal error (panic or crash)