From 441fe8ff9366e118a31638472c810bb642654b2d Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 21 Jan 2019 10:06:59 +0100 Subject: [PATCH] PythonLanguageLevelPusher.updateSdkLanguageLevels: don't start dumb task when there's nothing to do --- .../jetbrains/python/psi/impl/PythonLanguageLevelPusher.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java b/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java index 39db272b55e6..07b3b1b08eb6 100644 --- a/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java +++ b/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java @@ -276,6 +276,8 @@ public class PythonLanguageLevelPusher implements FilePropertyPusher sdks) { + if (sdks.isEmpty()) return; + final DumbService dumbService = DumbService.getInstance(project); final DumbModeTask task = new DumbModeTask() { @Override