--- a/eric6/UI/BrowserModel.py Tue Feb 23 17:31:36 2021 +0100 +++ b/eric6/UI/BrowserModel.py Tue Feb 23 17:38:12 2021 +0100 @@ -621,7 +621,7 @@ try: dictionary = Utilities.ClassBrowsers.readmodule( moduleName, [parentItem.dirName()], - parentItem.isPython3File()) + parentItem.isPython3File() or parentItem.isCythonFile()) except ImportError: return @@ -1160,6 +1160,11 @@ self._populated = False self._lazyPopulation = True self._moduleName = os.path.basename(finfo) + elif self.isCythonFile(): + pixName = "lexerCython" + self._populated = False + self._lazyPopulation = True + self._moduleName = os.path.basename(finfo) elif self.isRubyFile(): pixName = "fileRuby" self._populated = False @@ -1270,13 +1275,26 @@ """ Public method to check, if this file is a Python3 script. - @return flag indicating a Python file (boolean) + @return flag indicating a Python3 file + @rtype bool """ return ( self.fileext in Preferences.getPython("Python3Extensions") or (self.fileext == "" and self.sourceLanguage == "Python3") ) + def isCythonFile(self): + """ + Public method to check, if this file is a Cython file. + + @return flag indicating a Cython file + @rtype bool + """ + return ( + self.fileext in (".pyx", ".pxd", ".pxi") or + (self.fileext == "" and self.sourceLanguage == "Cython") + ) + def isRubyFile(self): """ Public method to check, if this file is a Ruby script.