mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
PY-71002 PEP-696: Support new syntax for default types of Type Parameters in new-style declarations
- PEP-696 adds a new syntax for declaring the default types of Type Parameters in new-new style generic classes, functions and type alias statements. Support these grammar changes. - Store info about default types in stubs for Type Parameters - Increment the stub version counter in PyFileElementType GitOrigin-RevId: b6b22e3eaa86ce06132885781e5775a89bf4b840
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d73bf77d9a
commit
7751fceaed
@@ -12,9 +12,16 @@ import org.jetbrains.annotations.Nullable;
|
||||
* For more information see <a href="https://peps.python.org/pep-0695/">PEP 695</a>
|
||||
*/
|
||||
public interface PyTypeParameter extends PyAstTypeParameter, PyElement, PsiNameIdentifierOwner, PyTypedElement, StubBasedPsiElement<PyTypeParameterStub> {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyExpression getBoundExpression() {
|
||||
return (PyExpression)PyAstTypeParameter.super.getBoundExpression();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
default PyExpression getDefaultExpression() {
|
||||
return (PyExpression)PyAstTypeParameter.super.getDefaultExpression();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,9 @@ public interface PyTypeParameterStub extends NamedStub<PyTypeParameter> {
|
||||
@Nullable
|
||||
String getBoundExpressionText();
|
||||
|
||||
@Nullable
|
||||
String getDefaultExpressionText();
|
||||
|
||||
@NotNull
|
||||
PyTypeParameter.Kind getKind();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user