mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
PY-29338 Revert "PY-28629: Fix resolving skeletons for implicit relative imports"
This reverts commit be8aaaaf53.
This commit is contained in:
@@ -335,10 +335,8 @@ public class ResolveImportUtil {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final PsiFile packageInit = PyUtil.as(PyUtil.turnDirIntoInit(parentDir), PsiFile.class);
|
||||
if (!withoutForeign && packageInit != null) {
|
||||
final PsiElement foreign = resolveForeignImports(packageInit, referencedName);
|
||||
if (!withoutForeign && parent instanceof PsiFile) {
|
||||
final PsiElement foreign = resolveForeignImports((PsiFile)parent, referencedName);
|
||||
if (foreign != null) {
|
||||
final ResolveResultList results = new ResolveResultList();
|
||||
results.addAll(resolved);
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
from core import *
|
||||
@@ -1 +0,0 @@
|
||||
from umath import *
|
||||
@@ -1,2 +0,0 @@
|
||||
def log():
|
||||
return 1.0
|
||||
@@ -1,3 +0,0 @@
|
||||
import oldnumpy
|
||||
oldnumpy.log
|
||||
# <ref>
|
||||
@@ -1,26 +0,0 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.jetbrains.python;
|
||||
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import com.jetbrains.python.fixtures.PyLightProjectDescriptor;
|
||||
import com.jetbrains.python.fixtures.PyMultiFileResolveTestCase;
|
||||
import com.jetbrains.python.psi.PyFunction;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author Yuli Fiterman
|
||||
*/
|
||||
public class PySkeletonResolveTest extends PyMultiFileResolveTestCase {
|
||||
protected static final PyLightProjectDescriptor ourPyDescriptor = new PyLightProjectDescriptor("WithBinaryModules");
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
return ourPyDescriptor;
|
||||
}
|
||||
|
||||
//PY-28629
|
||||
public void testOldNumpyRelativeImport() {
|
||||
assertInstanceOf(doResolve(), PyFunction.class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user