src/eric7/UI/BrowserModel.py

branch
eric7
changeset 9492
b3659e05a156
parent 9482
a2bc06a54d9d
child 9609
c2f9c10c47cc
--- a/src/eric7/UI/BrowserModel.py	Tue Nov 08 18:18:01 2022 +0100
+++ b/src/eric7/UI/BrowserModel.py	Tue Nov 08 18:18:42 2022 +0100
@@ -1292,8 +1292,13 @@
         @return flag indicating a Python3 file
         @rtype bool
         """
-        return self.fileext in Preferences.getPython("Python3Extensions") or (
-            self.fileext == "" and self.sourceLanguage == "Python3"
+        return (
+            self.fileext in Preferences.getPython("Python3Extensions")
+            or (self.fileext == "" and self.sourceLanguage == "Python3")
+            or (
+                not Preferences.getPython("Python3Extensions")
+                and self.fileext in (".py", ".pyw")
+            )
         )
 
     def isCythonFile(self):

eric ide

mercurial