mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-3968
This commit is contained in:
@@ -288,7 +288,7 @@ public class PyFileImpl extends PsiFileBase implements PyFile, PyExpression {
|
||||
// http://stackoverflow.com/questions/6048786/from-module-import-in-init-py-makes-module-name-visible
|
||||
if (PyNames.INIT_DOT_PY.equals(getName())) {
|
||||
final PyQualifiedName qName = stub.getImportSourceQName();
|
||||
if (qName.endsWith(name)) {
|
||||
if (qName != null && qName.endsWith(name)) {
|
||||
final PsiElement element = PyUtil.turnInitIntoDir(ResolveImportUtil.resolveFromImportStatementSource(stub.getPsi()));
|
||||
if (element != null && element.getParent() == getContainingDirectory()) {
|
||||
return element;
|
||||
|
||||
@@ -3,11 +3,13 @@ package com.jetbrains.python.psi.stubs;
|
||||
import com.intellij.psi.stubs.StubElement;
|
||||
import com.jetbrains.python.psi.PyFromImportStatement;
|
||||
import com.jetbrains.python.psi.impl.PyQualifiedName;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public interface PyFromImportStatementStub extends StubElement<PyFromImportStatement> {
|
||||
@Nullable
|
||||
PyQualifiedName getImportSourceQName();
|
||||
boolean isStarImport();
|
||||
int getRelativeLevel();
|
||||
|
||||
Reference in New Issue
Block a user