diff options
Diffstat (limited to 'python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java')
-rw-r--r-- | python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java b/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java index 7e15cab6ffda..af767684643e 100644 --- a/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java +++ b/python/src/com/jetbrains/python/psi/impl/PythonLanguageLevelPusher.java @@ -19,7 +19,9 @@ import com.intellij.facet.Facet; import com.intellij.facet.FacetManager; import com.intellij.openapi.application.Application; import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.fileTypes.FileTypeManager; +import com.intellij.openapi.fileTypes.FileTypeRegistry; import com.intellij.openapi.module.Module; import com.intellij.openapi.module.ModuleManager; import com.intellij.openapi.module.ModuleType; @@ -163,7 +165,8 @@ public class PythonLanguageLevelPusher implements FilePropertyPusher<LanguageLev oStream.close(); for (VirtualFile child : fileOrDir.getChildren()) { - if (!child.isDirectory() && PythonFileType.INSTANCE.equals(child.getFileType())) { + final FileType fileType = FileTypeRegistry.getInstance().getFileTypeByFileName(child.getName()); + if (!child.isDirectory() && PythonFileType.INSTANCE.equals(fileType)) { PushedFilePropertiesUpdater.getInstance(project).filePropertiesChanged(child); } } |