PY-1751: Introduce getMethodsInherited for PyClass.

This method collects all methods defined in the class and its parents.
Similar to `getPropertiesInherited` and `getClassAttributesInherited`.

GitOrigin-RevId: 8dcec5a002ffa105083ece6f4418d51e6d8c2879
This commit is contained in:
Ilia Zakoulov
2024-07-23 14:53:28 +02:00
committed by intellij-monorepo-bot
parent 86b23d40f1
commit a15b7f25b8
2 changed files with 20 additions and 0 deletions

View File

@@ -99,6 +99,16 @@ public interface PyClass extends PyAstClass, PsiNameIdentifierOwner, PyCompoundS
@Override
PyExpression @NotNull [] getSuperClassExpressions();
/**
* Collects methods defined in the class, and its parents.
* <p/>
* This method does not access AST if the underlying PSI is stub-based.
*
* @return class methods
*/
PyFunction @NotNull [] getMethodsInherited(@Nullable TypeEvalContext context);
/**
* Collects methods defined in the class.
* <p/>