LAB-31: don't exclude non-third-party typeshed libraries from scope

* now consistent with comment in the method
* fix accidental completion from typeshed in test

GitOrigin-RevId: d0245a52a8e51e41ef6c350cc2a610cb1e620326
This commit is contained in:
Adam Hood
2020-02-10 14:22:22 -05:00
committed by intellij-monorepo-bot
parent 1c2249a771
commit 6104bb5859
5 changed files with 6 additions and 6 deletions

View File

@@ -79,7 +79,7 @@ public class PySearchUtilBase {
}
// XXX: Disable resolving to any third-party libraries from typeshed in the same places where we don't want SDK tests
excludedDirs.addAll(Arrays.stream(sdk.getRootProvider().getFiles(OrderRootType.CLASSES))
.filter(file -> PyTypeShed.INSTANCE.isInside(file) || PyTypeShed.INSTANCE.isInThirdPartyLibraries(file))
.filter(file -> PyTypeShed.INSTANCE.isInside(file) && PyTypeShed.INSTANCE.isInThirdPartyLibraries(file))
.collect(Collectors.toList()));
if (!excludedDirs.isEmpty()) {
GlobalSearchScope scope = buildUnionScope(project, excludedDirs);

View File

@@ -1,3 +1,3 @@
from m1 import Cls
from m1 import SomeCls
Cls
SomeCls

View File

@@ -1 +1 @@
Cls<caret>
SomeCls<caret>

View File

@@ -1,2 +1,2 @@
class Cls:
class SomeCls:
pass

View File

@@ -1,2 +1,2 @@
class Cls:
class SomeCls:
pass