PY-34617 Move getClassAttributes(), getOwnSlots() from PyAstClass

GitOrigin-RevId: 39ee4f79543a35fc696f9c754f5c5cf89b711f63
This commit is contained in:
Petr
2024-07-28 00:24:15 +00:00
committed by intellij-monorepo-bot
parent 5147d37e25
commit cfa28c0d2a
3 changed files with 39 additions and 65 deletions
@@ -211,12 +211,7 @@ public interface PyClass extends PyAstClass, PsiNameIdentifierOwner, PyCompoundS
*
* @see #getClassAttributesInherited(TypeEvalContext)
*/
@Override
default List<PyTargetExpression> getClassAttributes() {
//noinspection unchecked
return (List<PyTargetExpression>)PyAstClass.super.getClassAttributes();
}
List<PyTargetExpression> getClassAttributes();
/**
* Returns all class attributes this class class contains, including inherited one.
@@ -295,6 +290,15 @@ public interface PyClass extends PyAstClass, PsiNameIdentifierOwner, PyCompoundS
@Nullable
List<String> getSlots(@Nullable TypeEvalContext context);
/**
* Returns the list of names in the class' __slots__ attribute, or null if the class
* does not define such an attribute.
*
* @return the list of names or null.
*/
@Nullable
List<String> getOwnSlots();
/**
* Process all declarations appearing at the syntactic level of this class' body, in particular class attributes, both
* assignments and type declarations, methods, and nested classes.