python: write action is unnecessary in some quick fixes
[idea/community.git] / python / src / com / jetbrains / python / inspections / PyInterpreterInspection.java
index 0f29353a0f0a679f0d46a830689e4ed8704418c4..cc953558862271eb554c4b9cc59256e6a587173d 100644 (file)
@@ -19,7 +19,6 @@ import com.intellij.codeInspection.LocalInspectionToolSession;
 import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.ProblemDescriptor;
 import com.intellij.codeInspection.ProblemsHolder;
-import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.module.ModuleUtilCore;
 import com.intellij.openapi.options.ShowSettingsUtil;
@@ -87,12 +86,14 @@ public class PyInterpreterInspection extends PyInspection {
       return "Configure Python Interpreter";
     }
 
+    @Override
+    public boolean startInWriteAction() {
+      return false;
+    }
+
     @Override
     public void applyFix(@NotNull final Project project, @NotNull ProblemDescriptor descriptor) {
-      ApplicationManager.getApplication().invokeLater(() -> {
-        // outside of read action
-        ShowSettingsUtil.getInstance().showSettingsDialog(project, "Project Interpreter");
-      });
+      ShowSettingsUtil.getInstance().showSettingsDialog(project, "Project Interpreter");
     }
   }
 }