diff --git a/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java b/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java index af2e9cb35235..a9cecc472700 100644 --- a/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java +++ b/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java @@ -223,7 +223,15 @@ public class PythonLanguageLevelPusher implements FilePropertyPusheremptyList(), true); + ApplicationManager.getApplication().invokeLater(new Runnable() { + @Override + public void run() { + if (project.isDisposed()) { + return; + } + FileContentUtil.reparseFiles(project, Collections.emptyList(), true); + } + }); } }