mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-13276 Remove PyKnownDecoratorUtil.hasChangingReturnTypeDecorator and its usages
GitOrigin-RevId: d84b7be4dc850d704bd41b61d65e5b77ccd132ce
This commit is contained in:
committed by
intellij-monorepo-bot
parent
677281f494
commit
9cb03803e1
@@ -145,11 +145,6 @@ public final class PyKnownDecoratorUtil {
|
||||
return !allDecoratorsAreKnown(decoratable, decorators) || decorators.contains(UNITTEST_MOCK_PATCH);
|
||||
}
|
||||
|
||||
public static boolean hasChangingReturnTypeDecorator(@NotNull PyDecoratable decoratable, @NotNull TypeEvalContext context) {
|
||||
final List<PyKnownDecorator> decorators = getKnownDecorators(decoratable, context);
|
||||
return ContainerUtil.exists(decorators, d -> d == UNITTEST_MOCK_PATCH);
|
||||
}
|
||||
|
||||
public static boolean hasUnknownOrUpdatingAttributesDecorator(@NotNull PyDecoratable decoratable, @NotNull TypeEvalContext context) {
|
||||
final List<PyKnownDecorator> decorators = getKnownDecorators(decoratable, context);
|
||||
|
||||
|
||||
@@ -1103,13 +1103,6 @@ public final class PyTypeChecker {
|
||||
if (type == null || (genericsAreUnknown && type instanceof PyTypeParameterType)) {
|
||||
return true;
|
||||
}
|
||||
if (type instanceof PyFunctionType) {
|
||||
final PyCallable callable = ((PyFunctionType)type).getCallable();
|
||||
if (callable instanceof PyDecoratable &&
|
||||
PyKnownDecoratorUtil.hasChangingReturnTypeDecorator((PyDecoratable)callable, context)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (type instanceof PyUnionType union) {
|
||||
if (!PyUnionType.isStrictSemanticsEnabled()) {
|
||||
return ContainerUtil.exists(union.getMembers(), member -> isUnknown(member, genericsAreUnknown, context));
|
||||
|
||||
Reference in New Issue
Block a user