boolean (@NotNull Project project, Editor editor, PsiFile file) { if (!(file instanceof PyFile)) { return false; } final PsiElement element = PyUtil.findNonWhitespaceAtOffset(file, editor.getCaretModel().getOffset()); final PyFunction function = PsiTreeUtil.getParentOfType(element, PyFunction.class); if (function == null) return false; final PyClass containingClass = function.getContainingClass(); if (containingClass == null) return false; final PyDecoratorList decoratorList = function.getDecoratorList(); if (decoratorList != null) { final PyDecorator staticMethod = decoratorList.findDecorator(PyNames.STATICMETHOD); if (staticMethod != null) return true; } return false; }