ruff/crates/ty_python_semantic/src/semantic_index
Aria Desires f0b03c3e86
[ty] resolve docstrings for modules (#19898)
This also reintroduces the `ResolvedDefinition::Module` variant because
reverse-engineering it in several places is a bit confusing. In an ideal
world we wouldn't have `ResolvedDefinition::FileWithRange` as it kinda
kills the ability to do richer analysis, so I want to chip away at its
scope wherever I can (currently it's used to point at asname parts of
import statements when doing `ImportAliasResolution::PreserveAliases`,
and also keyword arguments).

This also makes a kind of odd change to allow a hover to *only* produce
a docstring. This works around an oddity where hovering over a module
name in an import fails to resolve to a `ty` even though hovering over
uses of that imported name *does*.

The two fixed tests reflect the two interesting cases here.
2025-08-13 12:24:01 -04:00
..
builder
use_def [ty] improve lazy scope place lookup (#19321) 2025-07-25 07:11:11 +00:00
ast_ids.rs [ty] Split ScopedPlaceId into ScopedSymbolId and ScopedMemberId (#19497) 2025-07-25 13:54:33 +02:00
builder.rs [ty] Avoid overcounting shared memory usage (#19773) 2025-08-06 15:32:02 -04:00
definition.rs [ty] resolve docstrings for modules (#19898) 2025-08-13 12:24:01 -04:00
expression.rs [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00
member.rs [ty] Fix static assertion size check (#19814) 2025-08-07 13:38:16 -05:00
narrowing_constraints.rs [ty] Split ScopedPlaceId into ScopedSymbolId and ScopedMemberId (#19497) 2025-07-25 13:54:33 +02:00
place.rs Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
predicate.rs [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00
re_exports.rs [ty] Avoid overcounting shared memory usage (#19773) 2025-08-06 15:32:02 -04:00
reachability_constraints.rs [ty] Short circuit ReachabilityConstraints::analyze_single for dynamic types (#19867) 2025-08-11 21:58:34 +02:00
scope.rs [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00
symbol.rs [ty] more cases for the class body global fallback 2025-08-07 17:30:27 -07:00
use_def.rs [ty] Split ScopedPlaceId into ScopedSymbolId and ScopedMemberId (#19497) 2025-07-25 13:54:33 +02:00