ruff/crates/ty_python_semantic/src
Ibraheem Ahmed 96b156303b
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 (macos) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
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 / ty completion evaluation (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 (ruff) (push) Blocked by required conditions
CI / benchmarks instrumented (ty) (push) Blocked by required conditions
CI / benchmarks walltime (medium|multithreaded) (push) Blocked by required conditions
CI / benchmarks walltime (small|large) (push) Blocked by required conditions
[ty Playground] Release / publish (push) Waiting to run
[ty] Prefer declared type for invariant collection literals (#20927)
## Summary

Prefer the declared type for collection literals, e.g.,
```py
x: list[Any] = [1, "2", (3,)]
reveal_type(x)  # list[Any]
```

This solves a large part of https://github.com/astral-sh/ty/issues/136
for invariant generics, where respecting the declared type is a lot more
important. It also means that annotated dict literals with `dict[_,
Any]` is a way out of https://github.com/astral-sh/ty/issues/1248.
2025-10-16 16:11:28 -04:00
..
module_resolver [ty] Fix panic 'missing root' when handling completion request (#20917) 2025-10-16 16:23:02 +02:00
semantic_index [ty] Add version hint for failed stdlib attribute accesses (#20909) 2025-10-16 14:07:33 +00:00
types [ty] Prefer declared type for invariant collection literals (#20927) 2025-10-16 16:11:28 -04:00
util [ty] Avoid overcounting shared memory usage (#19773) 2025-08-06 15:32:02 -04:00
ast_node_ref.rs [ty] Implement the legacy PEP-484 convention for indicating positional-only parameters (#20248) 2025-09-05 17:56:06 +01:00
db.rs [ty] Limit shown import paths to at most 5 unless ty runs with -v (#20912) 2025-10-16 13:18:09 +02:00
dunder_all.rs [ty] Integrate type context for bidirectional inference (#20337) 2025-09-11 15:19:12 -04:00
lib.rs [ty] Move class_member to member module (#20837) 2025-10-13 10:58:37 +02:00
lint.rs [ty] Add LSP debug information command (#20379) 2025-09-20 11:15:13 +00:00
list.rs Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
module_name.rs [ty] Export some stuff from ty_python_semantic 2025-09-17 13:59:28 -04:00
node_key.rs [ty] Implement the legacy PEP-484 convention for indicating positional-only parameters (#20248) 2025-09-05 17:56:06 +01:00
place.rs [ty] refactor Place (#20871) 2025-10-15 20:19:19 +02:00
program.rs [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00
pull_types.rs Update Rust toolchain to 1.88 and MSRV to 1.86 (#19011) 2025-06-28 20:24:00 +02:00
python_platform.rs [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00
rank.rs [ty] Garbage-collect reachability constraints (#19414) 2025-07-21 14:16:27 -04:00
semantic_index.rs [ty] Implement the legacy PEP-484 convention for indicating positional-only parameters (#20248) 2025-09-05 17:56:06 +01:00
semantic_model.rs [ty] Do not re-export ide_support attributes from types (#20769) 2025-10-08 17:45:28 +02:00
site_packages.rs [ty] improve base conda distinction from child conda (#20675) 2025-10-03 13:56:06 +00:00
suppression.rs [ty] Document when a rule was added (#20859) 2025-10-14 14:33:48 +02:00
types.rs [ty] Don't track inferability via different Type variants (#20677) 2025-10-16 15:59:46 -04:00
unpack.rs [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00