Skip to content

Commit ba3d1ed

Browse files
committed
more
1 parent 59b1221 commit ba3d1ed

File tree

1 file changed

+10
-0
lines changed
  • crates/ty_python_semantic/src/semantic_index

1 file changed

+10
-0
lines changed

crates/ty_python_semantic/src/semantic_index/builder.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,16 @@ impl<'ast> Visitor<'ast> for SemanticIndexBuilder<'_, 'ast> {
15561556
.entry(name)
15571557
.or_insert(ImportKind::ImportFrom);
15581558
}
1559+
for name in &node.names {
1560+
let Some(relative_name) = ModuleName::new(&name.name) else {
1561+
continue;
1562+
};
1563+
let mut full_name = module_name.clone();
1564+
full_name.extend(&relative_name);
1565+
self.imported_modules
1566+
.entry(full_name)
1567+
.or_insert(ImportKind::ImportFrom);
1568+
}
15591569
}
15601570
}
15611571
}

0 commit comments

Comments
 (0)