PY-19999 Quickfix sets the value of the setting corresponding to its description

This commit is contained in:
Mikhail Golubev
2016-07-11 13:56:07 +03:00
parent 68c362ffac
commit f855a5d77e
@@ -260,10 +260,8 @@ public class PyChainedComparisonsInspection extends PyInspection {
public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
final PsiFile file = descriptor.getStartElement().getContainingFile();
InspectionProjectProfileManager.getInstance(project).getInspectionProfile().modifyProfile(model -> {
PyChainedComparisonsInspection tool =
(PyChainedComparisonsInspection)model.getUnwrappedTool(INSPECTION_SHORT_NAME,
file);
tool.ignoreConstantInTheMiddle = false;
final PyChainedComparisonsInspection tool = (PyChainedComparisonsInspection)model.getUnwrappedTool(INSPECTION_SHORT_NAME, file);
tool.ignoreConstantInTheMiddle = true;
});
}
}