mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix regression in import completion (PY-1956)
This commit is contained in:
@@ -103,7 +103,7 @@ public class VariantsProcessor implements PsiScopeProcessor {
|
||||
boolean handled_as_imported = false;
|
||||
if (element instanceof PyImportElement) {
|
||||
PyReferenceExpression ref = ((PyImportElement)element).getImportReference();
|
||||
if (ref != null) {
|
||||
if (ref != null && ref.getQualifier() == null) {
|
||||
String name = ref.getName();
|
||||
if (name != null && nameIsAcceptable(name)) {
|
||||
PsiElement resolved = ref.getReference().resolve();
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import root.nested_mod
|
||||
|
||||
root
|
||||
@@ -0,0 +1,3 @@
|
||||
import root.nested_mod
|
||||
|
||||
roo<caret>
|
||||
@@ -221,4 +221,12 @@ public class PythonCompletionTest extends PyLightFixtureTestCase {
|
||||
myFixture.completeBasic();
|
||||
myFixture.checkResultByFile(dirname + "importedFile.after.py");
|
||||
}
|
||||
|
||||
public void testImportedModule() { // PY-1956
|
||||
final String dirname = "completion/";
|
||||
myFixture.copyDirectoryToProject(dirname + "root", dirname + "root");
|
||||
myFixture.configureByFile(dirname + "importedModule.py");
|
||||
myFixture.completeBasic();
|
||||
myFixture.checkResultByFile(dirname + "importedModule.after.py");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user