void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement element = descriptor.getPsiElement(); final PyExceptPart exceptPart = PyExceptPartNavigator.getPyExceptPartByTarget(element); if (exceptPart != null) { final PsiElement exceptClass = exceptPart.getExceptClass(); if (exceptClass == null) return; exceptPart.deleteChildRange(exceptClass.getNextSibling(), element); } }