mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-17 02:53:01 +00:00
[ty] Support import <namespace> and from <namespace> import module (#18137)
This commit is contained in:
parent
7b253100f8
commit
76ab77fe01
16 changed files with 359 additions and 158 deletions
|
|
@ -187,7 +187,10 @@ impl HasNavigationTargets for Type<'_> {
|
|||
|
||||
impl HasNavigationTargets for TypeDefinition<'_> {
|
||||
fn navigation_targets(&self, db: &dyn Db) -> NavigationTargets {
|
||||
let full_range = self.full_range(db.upcast());
|
||||
let Some(full_range) = self.full_range(db.upcast()) else {
|
||||
return NavigationTargets::empty();
|
||||
};
|
||||
|
||||
NavigationTargets::single(NavigationTarget {
|
||||
file: full_range.file(),
|
||||
focus_range: self.focus_range(db.upcast()).unwrap_or(full_range).range(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue