From a94b169bdd0c44acdf0fe80503c157e824a2337c Mon Sep 17 00:00:00 2001 From: Semyon Proshev Date: Thu, 9 Nov 2017 19:33:25 +0300 Subject: [PATCH] Fix compatibility issues related to parameter and its stub. --- .../src/com/jetbrains/python/psi/PyParameter.java | 10 ---------- .../python/psi/stubs/PyNamedParameterStub.java | 10 ---------- .../psi/impl/stubs/PyNamedParameterStubImpl.java | 3 +-- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/python/psi-api/src/com/jetbrains/python/psi/PyParameter.java b/python/psi-api/src/com/jetbrains/python/psi/PyParameter.java index bd3f73869e0d..eec342cbcbe6 100644 --- a/python/psi-api/src/com/jetbrains/python/psi/PyParameter.java +++ b/python/psi-api/src/com/jetbrains/python/psi/PyParameter.java @@ -1,7 +1,6 @@ // Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.jetbrains.python.psi; -import com.jetbrains.python.PyNames; import org.jetbrains.annotations.Nullable; /** @@ -29,15 +28,6 @@ public interface PyParameter extends PyElement { boolean hasDefaultValue(); - /** - * @deprecated Use {@link PyParameter#getDefaultValueText()} instead. - * This method will be removed in 2018.2. - */ - @Deprecated - default boolean hasDefaultNoneValue() { - return PyNames.NONE.equals(getDefaultValueText()); - } - /** * @apiNote This method will be marked as abstract in 2018.2. */ diff --git a/python/psi-api/src/com/jetbrains/python/psi/stubs/PyNamedParameterStub.java b/python/psi-api/src/com/jetbrains/python/psi/stubs/PyNamedParameterStub.java index 70739cd88d14..d96f375dbad6 100644 --- a/python/psi-api/src/com/jetbrains/python/psi/stubs/PyNamedParameterStub.java +++ b/python/psi-api/src/com/jetbrains/python/psi/stubs/PyNamedParameterStub.java @@ -6,7 +6,6 @@ package com.jetbrains.python.psi.stubs; import com.intellij.psi.stubs.NamedStub; -import com.jetbrains.python.PyNames; import com.jetbrains.python.psi.PyNamedParameter; import org.jetbrains.annotations.Nullable; @@ -23,15 +22,6 @@ public interface PyNamedParameterStub extends NamedStub, PyAnn return getDefaultValueText() != null; } - /** - * @deprecated Use {@link PyNamedParameterStub#getDefaultValueText()} instead. - * This method will be removed in 2018.2. - */ - @Deprecated - default boolean hasDefaultNoneValue() { - return PyNames.NONE.equals(getDefaultValueText()); - } - @Nullable default String getDefaultValueText() { return null; diff --git a/python/src/com/jetbrains/python/psi/impl/stubs/PyNamedParameterStubImpl.java b/python/src/com/jetbrains/python/psi/impl/stubs/PyNamedParameterStubImpl.java index 8efdc4ad938f..bded1ca98dce 100644 --- a/python/src/com/jetbrains/python/psi/impl/stubs/PyNamedParameterStubImpl.java +++ b/python/src/com/jetbrains/python/psi/impl/stubs/PyNamedParameterStubImpl.java @@ -48,7 +48,6 @@ public class PyNamedParameterStubImpl extends StubBase impleme boolean isPositionalContainer, boolean isKeywordContainer, boolean hasDefaultValue, - boolean hasDefaultNoneValue, @Nullable String typeCommentAnnotation, @Nullable String annotation, StubElement parent, @@ -56,7 +55,7 @@ public class PyNamedParameterStubImpl extends StubBase impleme this(name, isPositionalContainer, isKeywordContainer, - hasDefaultNoneValue ? PyNames.NONE : hasDefaultValue ? PyNames.ELLIPSIS : null, + hasDefaultValue ? PyNames.ELLIPSIS : null, typeCommentAnnotation, annotation, parent,