eric6/UI/BrowserModel.py

changeset 7635
0cdead130a81
parent 7581
692838bf5d11
child 7677
d4d33990b355
--- a/eric6/UI/BrowserModel.py	Sat Jun 20 17:36:20 2020 +0200
+++ b/eric6/UI/BrowserModel.py	Sun Jun 21 18:26:12 2020 +0200
@@ -630,7 +630,7 @@
         try:
             dictionary = Utilities.ClassBrowsers.readmodule(
                 moduleName, [parentItem.dirName()],
-                parentItem.isPython2File() or parentItem.isPython3File())
+                parentItem.isPython3File())
         except ImportError:
             return
         
@@ -1112,15 +1112,7 @@
         self._moduleName = ''
         
         pixName = ""
-        if self.isPython2File():
-            if self.fileext == '.py':
-                pixName = "filePython"
-            else:
-                pixName = "filePython2"
-            self._populated = False
-            self._lazyPopulation = True
-            self._moduleName = os.path.basename(finfo)
-        elif self.isPython3File():
+        if self.isPython3File():
             pixName = "filePython"
             self._populated = False
             self._lazyPopulation = True
@@ -1183,7 +1175,6 @@
         self._filename = os.path.abspath(finfo)
         self.itemData[0] = os.path.basename(finfo)
         if (
-            self.isPython2File() or
             self.isPython3File() or
             self.isRubyFile() or
             self.isIdlFile() or
@@ -1232,18 +1223,6 @@
         """
         return self._moduleName
     
-    def isPython2File(self):
-        """
-        Public method to check, if this file is a Python script.
-        
-        @return flag indicating a Python file (boolean)
-        """
-        return (
-            self.fileext in Preferences.getPython("PythonExtensions") or
-            (self.fileext == "" and
-             self.sourceLanguage in ["Python", "Python2"])
-        )
-    
     def isPython3File(self):
         """
         Public method to check, if this file is a Python3 script.

eric ide

mercurial