mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
PY-71002 PEP-696: Adapt the interfaces and implementations of Type Parameter types for the support of defaults
In particular: - Add getters and setters for default types of Type Parameters - Change the type of declaration elements for Type Parameters from hardcoded PyTargetExpression to PyQualifiedNameOwner to make it possible to set new-style Type Parameters as declaration elements - Correctly calculate the qualified names of the new-style type alias statements as now they will be used in declaration elements of Type Parameters GitOrigin-RevId: 5185d85c1a75052dfcb3f97c0eee17b52540d24b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7751fceaed
commit
dd328f3a60
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* Represents a Type Parameter that can be a part of {@link PyTypeParameterList}<br>
|
||||
* 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> {
|
||||
public interface PyTypeParameter extends PyAstTypeParameter, PyElement, PsiNameIdentifierOwner, PyTypedElement, PyQualifiedNameOwner, StubBasedPsiElement<PyTypeParameterStub> {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
|
||||
@@ -79,4 +79,9 @@ public interface PyTypeParameterType extends PyType {
|
||||
* Results of {@code getScopeOwner()} and {@link #getName()} constitute unique "coordinates" of a given type parameter.
|
||||
*/
|
||||
@Nullable PyQualifiedNameOwner getScopeOwner();
|
||||
|
||||
@Nullable
|
||||
default PyType getDefaultType() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user