ruff/crates/ty_python_semantic/src
Andrew Gallant 553e568624 [ty] Refactor detection of import statements for completions
This commit essentially does away of all our old heuristic and piecemeal
code for detecting different kinds of import statements. Instead, we
offer one single state machine that does everything. This on its own
fixes a few bugs. For example, `import collections.abc, unico<CURSOR>`
would previously offer global scope completions instead of module
completions.

For the most part though, this commit is a refactoring that preserves
parity. In the next commit, we'll add support for completions on
relative imports.
2025-11-21 08:01:02 -05:00
..
module_resolver [ty] remove erroneous canonicalize (#21405) 2025-11-12 15:47:33 -05:00
semantic_index [ty] Support class-arguments for dataclass transformers (#21457) 2025-11-15 17:47:48 +01:00
types [ty] Attach subdiagnostics to unresolved-import errors for relative imports as well as absolute imports (#21554) 2025-11-21 12:40:53 +00:00
ast_node_ref.rs [ty] Improve semantic token classification for names (#21399) 2025-11-12 16:34:26 +00: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
diagnostic.rs [ty] Add hyperlinks to rule codes in CLI (#21502) 2025-11-18 16:36:59 +01:00
dunder_all.rs [ty] follow the breaking API changes made in salsa-rs/salsa#1015 (#21117) 2025-10-29 14:56:12 +00:00
lib.rs [ty] Implement go-to for binary and unary operators (#21001) 2025-10-21 19:25:41 +02:00
lint.rs [ty] Add hyperlinks to rule codes in CLI (#21502) 2025-11-18 16:36:59 +01:00
list.rs Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
module_name.rs [ty] support absolute from imports introducing local submodules in __init__.py files (#21372) 2025-11-11 13:04:42 -05: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] Make __getattr__ available for ModuleType instances (#21450) 2025-11-14 13:59:14 +01:00
program.rs [ty] Remove mentions of VS Code from server logs (#21155) 2025-11-03 14:49:58 +00: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 Update Rust toolchain to 1.91 (#21179) 2025-11-01 01:50:58 +00:00
rank.rs [ty] Garbage-collect reachability constraints (#19414) 2025-07-21 14:16:27 -04:00
semantic_index.rs [ty] Skip eagerly evaluated scopes for attribute storing (#20856) 2025-11-11 14:45:34 -08:00
semantic_model.rs [ty] Refactor detection of import statements for completions 2025-11-21 08:01:02 -05:00
site_packages.rs [ty] Discover site-packages from the environment that ty is installed in (#21286) 2025-11-06 09:27:49 -05:00
subscript.rs [ty] Use "cannot" consistently over "can not" (#21255) 2025-11-03 10:38:20 -05:00
suppression.rs [ty] Add hyperlinks to rule codes in CLI (#21502) 2025-11-18 16:36:59 +01:00
types.rs [ty] support PEP 613 type aliases (#21394) 2025-11-20 17:59:35 -08:00
unpack.rs [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00