void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PyFunction function = PsiTreeUtil.getParentOfType(descriptor.getPsiElement(), PyFunction.class); if (function != null) { PythonUiService.getInstance().annotateTypesIntention(PyQuickFixUtil.getEditor(function), function); } }