void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiFile file = descriptor.getStartElement().getContainingFile(); InspectionProfileModifiableModelKt.modifyAndCommitProjectProfile(project, model -> { PyPep8NamingInspection tool = (PyPep8NamingInspection)model.getUnwrappedTool(INSPECTION_SHORT_NAME, file); if (!tool.ignoredErrors.contains(myCode)) { tool.ignoredErrors.add(myCode); } }); }