PY-84356 Group related TypeEvalContext methods together

GitOrigin-RevId: 3eadd8c1322b8ff7a3fb145c39f8fdf8f8d8c19c
This commit is contained in:
Petr
2025-09-22 14:58:07 +02:00
committed by intellij-monorepo-bot
parent fd6322f117
commit fdade3b615

View File

@@ -80,6 +80,10 @@ public sealed class TypeEvalContext {
return myConstraints.myAllowCallContext && !inPyiFile(element) && inOrigin(element);
}
public boolean maySwitchToAST(@NotNull PsiElement element) {
return myConstraints.myAllowStubToAST && !inPyiFile(element) || inOrigin(element);
}
/**
* Create a context for code completion.
* <p/>
@@ -316,10 +320,6 @@ public sealed class TypeEvalContext {
}
}
public boolean maySwitchToAST(@NotNull PsiElement element) {
return myConstraints.myAllowStubToAST && !inPyiFile(element) || inOrigin(element);
}
public @Nullable PsiFile getOrigin() {
return myConstraints.myOrigin;
}