mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't auto-import from current file (PY-2212)
This commit is contained in:
@@ -110,7 +110,7 @@ public class PythonReferenceImporter implements ReferenceImporter {
|
||||
for (PsiElement symbol : symbols) {
|
||||
if (isTopLevel(symbol)) { // we only want top-level symbols
|
||||
PsiFile srcfile = symbol.getContainingFile();
|
||||
if (srcfile != null && srcfile != existing_import_file) {
|
||||
if (srcfile != null && srcfile != existing_import_file && srcfile != node.getContainingFile()) {
|
||||
VirtualFile vfile = srcfile.getVirtualFile();
|
||||
if (vfile != null) {
|
||||
String import_path = ResolveImportUtil.findShortestImportableName(node, vfile);
|
||||
|
||||
Reference in New Issue
Block a user