Fix compatibility issues related to parameter and its stub.

This commit is contained in:
Semyon Proshev
2017-11-09 19:35:26 +03:00
parent 14dc74b55e
commit a94b169bdd
3 changed files with 1 additions and 22 deletions
@@ -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.
*/
@@ -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<PyNamedParameter>, 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;
@@ -48,7 +48,6 @@ public class PyNamedParameterStubImpl extends StubBase<PyNamedParameter> 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<PyNamedParameter> impleme
this(name,
isPositionalContainer,
isKeywordContainer,
hasDefaultNoneValue ? PyNames.NONE : hasDefaultValue ? PyNames.ELLIPSIS : null,
hasDefaultValue ? PyNames.ELLIPSIS : null,
typeCommentAnnotation,
annotation,
parent,