mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Enable TypeEvalContext#assumeType only if python.use.better.control.flow.type.inference is enabled
GitOrigin-RevId: da7e3452bfbdbfd618dbe166e5a6c199f28cae6f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
52ec309c76
commit
2123dbfa15
@@ -193,6 +193,9 @@ public sealed class TypeEvalContext {
|
||||
|
||||
@ApiStatus.Internal
|
||||
public <R> @Nullable R assumeType(@NotNull PyTypedElement element, @Nullable PyType type, @NotNull Function<TypeEvalContext, R> func) {
|
||||
if (!Registry.is("python.use.better.control.flow.type.inference")) {
|
||||
return func.apply(this);
|
||||
}
|
||||
if (getKnownType(element) != null) {
|
||||
// Temporary solution, as overwriting known type might introduce inconsistencies with its dependencies.
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user