mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'python3.4'
This commit is contained in:
@@ -218,4 +218,19 @@ public interface PyClass extends PsiNameIdentifierOwner, PyStatement, NameDefine
|
||||
|
||||
boolean processClassLevelDeclarations(@NotNull PsiScopeProcessor processor);
|
||||
boolean processInstanceLevelDeclarations(@NotNull PsiScopeProcessor processor, @Nullable PsiElement location);
|
||||
|
||||
/**
|
||||
* Returns the type representing the metaclass of the class if it is explicitly set, null otherwise.
|
||||
*/
|
||||
@Nullable
|
||||
PyClassLikeType getMetaClassType(@NotNull TypeEvalContext context);
|
||||
|
||||
/**
|
||||
* Returns the expression that defines the metaclass of the class.
|
||||
*
|
||||
* It might be defined outside the class in case of file-level __metaclass__ attributes.
|
||||
* Operates at the AST level.
|
||||
*/
|
||||
@Nullable
|
||||
PyExpression getMetaClassExpression();
|
||||
}
|
||||
|
||||
@@ -41,9 +41,6 @@ public interface PyTypeProvider {
|
||||
@Nullable
|
||||
PyType getReturnType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context);
|
||||
|
||||
@Nullable
|
||||
PyType getIterationType(@NotNull PyClass iterable);
|
||||
|
||||
@Nullable
|
||||
PyType getContextManagerVariableType(PyClass contextManager, PyExpression withExpression, TypeEvalContext context);
|
||||
|
||||
|
||||
@@ -20,13 +20,15 @@
|
||||
package com.jetbrains.python.psi.stubs;
|
||||
|
||||
import com.intellij.psi.stubs.NamedStub;
|
||||
import com.jetbrains.python.psi.PyClass;
|
||||
import com.intellij.psi.util.QualifiedName;
|
||||
import com.jetbrains.python.psi.PyClass;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PyClassStub extends NamedStub<PyClass> {
|
||||
QualifiedName[] getSuperClasses();
|
||||
@Nullable QualifiedName getMetaClass();
|
||||
List<String> getSlots();
|
||||
String getDocString();
|
||||
}
|
||||
@@ -44,4 +44,7 @@ public interface PyClassLikeType extends PyCallableType {
|
||||
boolean inherited);
|
||||
|
||||
boolean isValid();
|
||||
|
||||
@Nullable
|
||||
PyClassLikeType getMetaClassType(@NotNull TypeEvalContext context, boolean inherited);
|
||||
}
|
||||
|
||||
@@ -106,11 +106,6 @@ public class PyTypeProviderBase implements PyTypeProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PyType getIterationType(@NotNull PyClass iterable) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public PyType getContextManagerVariableType(PyClass contextManager, PyExpression withExpression, TypeEvalContext context) {
|
||||
|
||||
Reference in New Issue
Block a user