diff --git a/python/src/com/jetbrains/python/psi/impl/PyStarImportElementImpl.java b/python/src/com/jetbrains/python/psi/impl/PyStarImportElementImpl.java index 3c3072453326..4011c233e38d 100644 --- a/python/src/com/jetbrains/python/psi/impl/PyStarImportElementImpl.java +++ b/python/src/com/jetbrains/python/psi/impl/PyStarImportElementImpl.java @@ -52,9 +52,7 @@ public class PyStarImportElementImpl extends PyElementImpl implements PyStarImpo for (PsiElement importedFile : new HashSet(importedFiles)) { // resolver gives lots of duplicates final PsiElement source = PyUtil.turnDirIntoInit(importedFile); if (source instanceof PyFile) { - // PY-13140 Iterable declaredNames = ((PyFile)source).iterateNames(); - // Filter out names starting with underscore only if __all__ attribute is not defined in the module if (((PyFile)source).getDunderAll() == null) { declaredNames = excludeUnderscoredNames(declaredNames); } @@ -70,7 +68,7 @@ public class PyStarImportElementImpl extends PyElementImpl implements PyStarImpo return Iterables.filter(declaredNames, new Predicate() { @Override public boolean apply(@Nullable PyElement input) { - String name = input != null ? input.getName() : null; + final String name = input != null ? input.getName() : null; if (name != null && name.startsWith("_")) { return false; } @@ -97,7 +95,6 @@ public class PyStarImportElementImpl extends PyElementImpl implements PyStarImpo final PsiElement result = results != null && !results.isEmpty() ? results.get(0).getElement() : null; if (result != null) { final List all = sourceFile.getDunderAll(); - // PY-13140 if (all != null ? !all.contains(name) : name.startsWith("_")) { continue; } diff --git a/python/testSrc/com/jetbrains/python/PythonCompletionTest.java b/python/testSrc/com/jetbrains/python/PythonCompletionTest.java index d2e322288271..59dbf0f714c3 100644 --- a/python/testSrc/com/jetbrains/python/PythonCompletionTest.java +++ b/python/testSrc/com/jetbrains/python/PythonCompletionTest.java @@ -618,7 +618,6 @@ public class PythonCompletionTest extends PyTestCase { // PY-13140 public void testModulePrivateNamesCompletedInsideImport() { - //doMultiFileTest(); myFixture.copyDirectoryToProject("completion/" + getTestName(true), ""); myFixture.configureByFile("a.py"); myFixture.completeBasic(); diff --git a/python/testSrc/com/jetbrains/python/inspections/PyUnresolvedReferencesInspectionTest.java b/python/testSrc/com/jetbrains/python/inspections/PyUnresolvedReferencesInspectionTest.java index 68f8f0e18a93..0c5e87ab1001 100644 --- a/python/testSrc/com/jetbrains/python/inspections/PyUnresolvedReferencesInspectionTest.java +++ b/python/testSrc/com/jetbrains/python/inspections/PyUnresolvedReferencesInspectionTest.java @@ -366,6 +366,7 @@ public class PyUnresolvedReferencesInspectionTest extends PyInspectionTestCase { doMultiFileTest(); } + // PY-13140 public void testPrivateModuleNames() { doMultiFileTest(); }