mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
[python] get rid of IStubElementType and move logic about working with stubs to impl classes PY-61639
GitOrigin-RevId: 062dead109c25d944d4f61e901dc3c64c00b392e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b1f1b8c8c0
commit
aec2051aa9
@@ -352,18 +352,6 @@ public interface PyClass extends PyAstClass, PsiNameIdentifierOwner, PyCompoundS
|
||||
@Nullable
|
||||
PyClassLikeType getType(@NotNull TypeEvalContext context);
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyTypeParameterList getTypeParameterList() {
|
||||
return (PyTypeParameterList)PyAstClass.super.getTypeParameterList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyDecoratorList getDecoratorList() {
|
||||
return (PyDecoratorList)PyAstClass.super.getDecoratorList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyStringLiteralExpression getDocStringExpression() {
|
||||
|
||||
@@ -45,9 +45,7 @@ public interface PyFromImportStatement extends PyAstFromImportStatement, PyImpor
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
default PyStarImportElement getStarImportElement() {
|
||||
return (PyStarImportElement)PyAstFromImportStatement.super.getStarImportElement();
|
||||
}
|
||||
PyStarImportElement getStarImportElement();
|
||||
|
||||
/**
|
||||
* Resolves the import source qualified name to a file or directory. Note: performs a Python only resolve,
|
||||
|
||||
@@ -54,12 +54,6 @@ public interface PyFunction extends PyAstFunction, StubBasedPsiElement<PyFunctio
|
||||
return (PyStatementList)PyAstFunction.super.getStatementList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
default PyParameterList getParameterList() {
|
||||
return (PyParameterList)PyAstFunction.super.getParameterList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyFunction asMethod() {
|
||||
@@ -72,24 +66,6 @@ public interface PyFunction extends PyAstFunction, StubBasedPsiElement<PyFunctio
|
||||
return (PyStringLiteralExpression)PyAstFunction.super.getDocStringExpression();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyTypeParameterList getTypeParameterList() {
|
||||
return (PyTypeParameterList)PyAstFunction.super.getTypeParameterList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyDecoratorList getDecoratorList() {
|
||||
return (PyDecoratorList)PyAstFunction.super.getDecoratorList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyAnnotation getAnnotation() {
|
||||
return (PyAnnotation)PyAstFunction.super.getAnnotation();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyClass getContainingClass() {
|
||||
|
||||
@@ -75,11 +75,5 @@ public interface PyNamedParameter extends PyAstNamedParameter, PyParameter, PsiN
|
||||
default PyTupleParameter getAsTuple() {
|
||||
return (PyTupleParameter)PyAstNamedParameter.super.getAsTuple();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyAnnotation getAnnotation() {
|
||||
return (PyAnnotation)PyAstNamedParameter.super.getAnnotation();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,10 +27,4 @@ public interface PyTypeAliasStatement extends PyAstTypeAliasStatement, PyStateme
|
||||
*/
|
||||
@Nullable
|
||||
String getTypeExpressionText();
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyTypeParameterList getTypeParameterList() {
|
||||
return (PyTypeParameterList)PyAstTypeAliasStatement.super.getTypeParameterList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,10 +10,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* which was added in <a href="https://peps.python.org/pep-0695/">PEP 695</a>
|
||||
*/
|
||||
public interface PyTypeParameterListOwner extends PyAstTypeParameterListOwner, PsiElement {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyTypeParameterList getTypeParameterList() {
|
||||
return null;
|
||||
}
|
||||
PyTypeParameterList getTypeParameterList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user