ruff/crates/ty_python_semantic/resources/mdtest/literal
Ibraheem Ahmed e84d523bcf
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / Fuzz for new ty panics (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / check playground (push) Blocked by required conditions
CI / benchmarks-instrumented (push) Blocked by required conditions
CI / benchmarks-walltime (push) Blocked by required conditions
[ty Playground] Release / publish (push) Waiting to run
[ty] Infer more precise types for collection literals (#20360)
## Summary

Part of https://github.com/astral-sh/ty/issues/168. Infer more precise types for collection literals (currently, only `list` and `set`). For example,

```py
x = [1, 2, 3] # revealed: list[Unknown | int]
y: list[int] = [1, 2, 3] # revealed: list[int]
```

This could easily be extended to `dict` literals, but I am intentionally limiting scope for now.
2025-09-17 18:51:50 -04:00
..
collections [ty] Infer more precise types for collection literals (#20360) 2025-09-17 18:51:50 -04:00
boolean.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
bytes.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
complex.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
ellipsis.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
f_string.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
float.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
integer.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
string.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00