--- a/src/eric7/QScintilla/Lexers/__init__.py Wed Dec 20 19:28:22 2023 +0100 +++ b/src/eric7/QScintilla/Lexers/__init__.py Thu Dec 21 12:03:40 2023 +0100 @@ -111,7 +111,7 @@ The first is the display string for the language, the second is a dummy file name, which can be used to derive the lexer, and the third is the name of an icon file. - (string, string, string) + @rtype dict of {str: [str, str, str]} """ supportedLanguages = { "Bash": [QCoreApplication.translate("Lexers", "Bash"), "dummy.sh", "lexerBash"], @@ -282,9 +282,12 @@ """ Module function to get an icon for a language. - @param language language of the lexer (string) - @param pixmap flag indicating to return a pixmap (boolean) - @return icon for the language (QPixmap or QIcon) + @param language language of the lexer + @type str + @param pixmap flag indicating to return a pixmap + @type bool + @return icon for the language + @rtype QPixmap or QIcon """ supportedLanguages = getSupportedLanguages() iconFileName = ( @@ -300,10 +303,14 @@ """ Module function to instantiate a lexer object for a given language. - @param language language of the lexer (string) - @param parent reference to the parent object (QObject) - @param pyname name of the pygments lexer to use (string) - @return reference to the instantiated lexer object (QsciLexer) + @param language language of the lexer + @type str + @param parent reference to the parent object + @type QObject + @param pyname name of the pygments lexer to use + @type str + @return reference to the instantiated lexer object + @rtype QsciLexer """ if not pyname: languageLexerMapping = { @@ -372,8 +379,11 @@ Private module function to instantiate a pygments lexer. @param parent reference to the parent widget - @param name name of the pygments lexer to use (string) - @return reference to the lexer (LexerPygments) or None + @type QWidget + @param name name of the pygments lexer to use + @type str + @return reference to the lexer or None + @rtype LexerPygments """ from .LexerPygments import LexerPygments @@ -388,13 +398,15 @@ """ Module function to get the file filter list for an open file operation. - @param includeAll flag indicating the inclusion of the - All Files filter (boolean) - @param asString flag indicating the list should be returned - as a string (boolean) - @param withAdditional flag indicating to include additional filters - defined by the user (boolean) - @return file filter list (list of strings or string) + @param includeAll flag indicating the inclusion of the "All Files" filter + @type bool + @param asString flag indicating the list should be returned as a string + @type bool + @param withAdditional flag indicating to include additional filters defined + by the user + @type bool + @return file filter list + @rtype list of str or str """ openFileFiltersList = [ QCoreApplication.translate("Lexers", "Python Files (*.py *.py3)"), @@ -479,13 +491,15 @@ """ Module function to get the file filter list for a save file operation. - @param includeAll flag indicating the inclusion of the - All Files filter (boolean) - @param asString flag indicating the list should be returned - as a string (boolean) - @param withAdditional flag indicating to include additional filters - defined by the user (boolean) - @return file filter list (list of strings or string) + @param includeAll flag indicating the inclusion of the "All Files" filter + @type bool + @param asString flag indicating the list should be returned as a string + @type bool + @param withAdditional flag indicating to include additional filters defined + by the user + @type bool + @return file filter list + @rtype list of str or str """ saveFileFiltersList = [ QCoreApplication.translate("Lexers", "Python3 Files (*.py)"), @@ -569,6 +583,7 @@ Module function to get a dictionary with the default associations. @return dictionary with the default lexer associations + @rtype dict """ assocs = { "*.sh": "Bash",