allow from imports in nonglobal scopes to add available submodule attributes
This commit is contained in:
committed by
Aria Desires
parent
dbe5696f8f
commit
e82cb13384
@@ -1535,11 +1535,12 @@ impl<'ast> Visitor<'ast> for SemanticIndexBuilder<'_, 'ast> {
|
||||
is_self_import = &module_name == thispackage;
|
||||
}
|
||||
|
||||
if self.current_scope().is_global() && node.module.is_some() {
|
||||
if node.module.is_some() {
|
||||
if let Ok(thispackage) = this_package
|
||||
&& let Some(relative_submodule) = module_name.relative_to(&thispackage)
|
||||
{
|
||||
if is_package
|
||||
&& self.current_scope().is_global()
|
||||
&& let Some(direct_submodule) =
|
||||
relative_submodule.components().next()
|
||||
&& !self.seen_submodule_imports.contains(direct_submodule)
|
||||
|
||||
Reference in New Issue
Block a user