mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Revert "PY-86493 Avoid using an external type provider to resolve the type when the type hint itself originated from an external type provider."
This reverts commit 27ae660342d8322dbbd92d0fd98d14cb9ac90ee7. GitOrigin-RevId: 92ae43b4212b140057435290a8234d8519c9a9ff
This commit is contained in:
committed by
intellij-monorepo-bot
parent
51a2b019d0
commit
c6ecb30532
@@ -47,7 +47,6 @@ public sealed class TypeEvalContext {
|
||||
}
|
||||
|
||||
private final @NotNull TypeEvalConstraints myConstraints;
|
||||
private boolean isInsideExternalTypeProviderCall = false;
|
||||
|
||||
private List<String> myTrace;
|
||||
private String myTraceIndent = "";
|
||||
@@ -311,11 +310,9 @@ public sealed class TypeEvalContext {
|
||||
false,
|
||||
() -> {
|
||||
var provider = TypeEvalExternalTypeProvider.EP_NAME.getExtensionList().stream().filter(TypeEvalExternalTypeProvider::isAvailable).findFirst().orElse(null);
|
||||
if (!isInsideExternalTypeProviderCall && provider != null) {
|
||||
if (provider != null) {
|
||||
try {
|
||||
isInsideExternalTypeProviderCall = true;
|
||||
var provided = provider.provideType(element, this);
|
||||
isInsideExternalTypeProviderCall = false;
|
||||
if (provided != null) {
|
||||
var type = provided.get();
|
||||
myExternalEvaluated.put(element, type == null ? PyNullType.INSTANCE : type);
|
||||
@@ -328,6 +325,7 @@ public sealed class TypeEvalContext {
|
||||
catch (Exception e) {
|
||||
logger.warn("Exception during external type provider " + provider.getClass().getName(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
PyType type = element.getType(this, Key.INSTANCE);
|
||||
|
||||
Reference in New Issue
Block a user