src/eric7/QScintilla/Lexers/LexerPygments.py

branch
eric7
changeset 10431
64157aeb0312
parent 10069
435cc5875135
child 10439
21c28b0f9e41
diff -r e440aaf179ce -r 64157aeb0312 src/eric7/QScintilla/Lexers/LexerPygments.py
--- a/src/eric7/QScintilla/Lexers/LexerPygments.py	Wed Dec 20 19:28:22 2023 +0100
+++ b/src/eric7/QScintilla/Lexers/LexerPygments.py	Thu Dec 21 12:03:40 2023 +0100
@@ -166,7 +166,9 @@
         Constructor
 
         @param parent parent widget of this lexer
-        @param name name of the pygments lexer to use (string)
+        @type QWidget
+        @param name name of the pygments lexer to use
+        @type str
         """
         super().__init__(parent)
 
@@ -383,7 +385,8 @@
         """
         Public method returning the language of the lexer.
 
-        @return language of the lexer (string)
+        @return language of the lexer
+        @rtype str
         """
         if self.__pygmentsName and not self.__inReadSettings:
             return self.__pygmentsName
@@ -395,8 +398,10 @@
         Public method returning the descriptions of the styles supported
         by the lexer.
 
-        @param style style number (integer)
-        @return description for the style (string)
+        @param style style number
+        @type int
+        @return description for the style
+        @rtype str
         """
         try:
             return self.descriptions[style]
@@ -407,8 +412,10 @@
         """
         Public method to get the default foreground color for a style.
 
-        @param style style number (integer)
-        @return foreground color (QColor)
+        @param style style number
+        @type int
+        @return foreground color
+        @rtype QColor
         """
         try:
             return self.defaultColors[style]
@@ -419,8 +426,10 @@
         """
         Public method to get the default background color for a style.
 
-        @param style style number (integer)
-        @return background color (QColor)
+        @param style style number
+        @type int
+        @return background color
+        @rtype QColor
         """
         try:
             return self.defaultPapers[style]
@@ -431,8 +440,10 @@
         """
         Public method to get the default font for a style.
 
-        @param style style number (integer)
-        @return font (QFont)
+        @param style style number
+        @type int
+        @return font
+        @rtype QFont
         """
         if style in [
             PYGMENTS_COMMENT,
@@ -491,8 +502,10 @@
         """
         Public method to get the default fill to eol flag.
 
-        @param style style number (integer)
-        @return fill to eol flag (boolean)
+        @param style style number
+        @type int
+        @return fill to eol flag
+        @rtype bool
         """
         try:
             return self.defaultEolFills[style]
@@ -503,8 +516,10 @@
         """
         Private method to guess a pygments lexer.
 
-        @param text text to base guessing on (string)
-        @return reference to the guessed lexer (pygments.lexer)
+        @param text text to base guessing on
+        @type str
+        @return reference to the guessed lexer
+        @rtype pygments.lexer
         """
         lexer = None
 
@@ -532,7 +547,8 @@
         """
         Public method to check, if the lexer is able to style the text.
 
-        @return flag indicating the lexer capability (boolean)
+        @return flag indicating the lexer capability
+        @rtype bool
         """
         if self.editor is None:
             return True
@@ -546,7 +562,8 @@
         """
         Public method to get the name of the pygments lexer.
 
-        @return name of the pygments lexer (string)
+        @return name of the pygments lexer
+        @rtype str
         """
         if self.__lexer is None:
             return ""
@@ -557,8 +574,10 @@
         """
         Public method to perform the styling.
 
-        @param start position of first character to be styled (integer)
-        @param end position of last character to be styled (integer)
+        @param start position of first character to be styled
+        @type int
+        @param end position of last character to be styled
+        @type int
         """
         text = self.editor.text()[: end + 1]
         textLen = len(text.encode("utf-8"))
@@ -595,8 +614,10 @@
         """
         Public method to check, if a style is a comment style.
 
-        @param style style to check (integer)
-        @return flag indicating a comment style (boolean)
+        @param style style to check
+        @type int
+        @return flag indicating a comment style
+        @rtype bool
         """
         return style in [PYGMENTS_COMMENT]
 
@@ -604,8 +625,10 @@
         """
         Public method to check, if a style is a string style.
 
-        @param style style to check (integer)
-        @return flag indicating a string style (boolean)
+        @param style style to check
+        @type int
+        @return flag indicating a string style
+        @rtype bool
         """
         return style in [
             PYGMENTS_STRING,
@@ -621,8 +644,10 @@
         """
         Public method to get the default keywords.
 
-        @param kwSet number of the keyword set (integer)
-        @return string giving the keywords (string) or None
+        @param kwSet number of the keyword set
+        @type int
+        @return string giving the keywords or None
+        @rtype str
         """
         return None  # __IGNORE_WARNING_M831__
 

eric ide

mercurial