if (context instanceof PyClass) return (PyClass)context;
if (context instanceof PyFunction) return ((PyFunction)context).getContainingClass();
else return PsiTreeUtil.getParentOfType(context, PyClass.class);
}
public static final DocumentationBuilderKit.LinkWrapper LinkMyClass = new DocumentationBuilderKit.LinkWrapper(LINK_TYPE_CLASS); // link item to containing class
<BUG>public String generateDocumentationContentStub(PyFunction element, String offset, boolean checkReturn) {
</BUG>
Project project = element.getProject();
PyDocumentationSettings documentationSettings = PyDocumentationSettings.getInstance(project);
String result = "";

if (context instanceof PyClass) return (PyClass)context;
if (context instanceof PyFunction) return ((PyFunction)context).getContainingClass();
else return PsiTreeUtil.getParentOfType(context, PyClass.class);
}
public static final DocumentationBuilderKit.LinkWrapper LinkMyClass = new DocumentationBuilderKit.LinkWrapper(LINK_TYPE_CLASS); // link item to containing class
public static String generateDocumentationContentStub(PyFunction element, String offset, boolean checkReturn) {
Project project = element.getProject();
PyDocumentationSettings documentationSettings = PyDocumentationSettings.getInstance(project);
String result = "";
