Changed the browser model to allow standard Python extension if none are configured. eric7

Tue, 08 Nov 2022 18:18:42 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 08 Nov 2022 18:18:42 +0100
branch
eric7
changeset 9492
b3659e05a156
parent 9491
91bcf8b893ee
child 9493
aeaa6bf49831

Changed the browser model to allow standard Python extension if none are configured.

src/eric7/UI/BrowserModel.py file | annotate | diff | comparison | revisions
--- 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