src/eric7/QScintilla/Lexers/LexerQSS.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
--- a/src/eric7/QScintilla/Lexers/LexerQSS.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/QScintilla/Lexers/LexerQSS.py	Wed Jul 13 14:55:47 2022 +0200
@@ -19,21 +19,19 @@
     """
     Subclass to implement some additional lexer dependent methods.
     """
+
     def __init__(self, parent=None):
         """
         Constructor
-        
+
         @param parent parent widget of this lexer
         """
         QsciLexerCSS.__init__(self, parent)
         Lexer.__init__(self)
-        
+
         self.commentString = "#"
-        self.streamCommentString = {
-            'start': '/* ',
-            'end': ' */'
-        }
-        
+        self.streamCommentString = {"start": "/* ", "end": " */"}
+
         self.keywordSetDescriptions = [
             self.tr("CSS1 Properties"),
             self.tr("Pseudo-Classes"),
@@ -44,7 +42,7 @@
             self.tr("Browser-Specific Pseudo-Classes"),
             self.tr("Browser-Specific Pseudo-Elements"),
         ]
-    
+
     def initProperties(self):
         """
         Public slot to initialize the properties.
@@ -52,36 +50,35 @@
         self.setFoldComments(Preferences.getEditor("CssFoldComment"))
         self.setFoldCompact(Preferences.getEditor("AllFoldCompact"))
         with contextlib.suppress(AttributeError):
-            self.setHSSLanguage(
-                Preferences.getEditor("CssHssSupport"))
-            self.setLessLanguage(
-                Preferences.getEditor("CssLessSupport"))
-            self.setSCSSLanguage(
-                Preferences.getEditor("CssSassySupport"))
-    
+            self.setHSSLanguage(Preferences.getEditor("CssHssSupport"))
+            self.setLessLanguage(Preferences.getEditor("CssLessSupport"))
+            self.setSCSSLanguage(Preferences.getEditor("CssSassySupport"))
+
     def isCommentStyle(self, style):
         """
         Public method to check, if a style is a comment style.
-        
+
         @param style style to check (integer)
         @return flag indicating a comment style (boolean)
         """
         return style in [QsciLexerCSS.Comment]
-    
+
     def isStringStyle(self, style):
         """
         Public method to check, if a style is a string style.
-        
+
         @param style style to check (integer)
         @return flag indicating a string style (boolean)
         """
-        return style in [QsciLexerCSS.DoubleQuotedString,
-                         QsciLexerCSS.SingleQuotedString]
-    
+        return style in [
+            QsciLexerCSS.DoubleQuotedString,
+            QsciLexerCSS.SingleQuotedString,
+        ]
+
     def defaultKeywords(self, kwSet):
         """
         Public method to get the default keywords.
-        
+
         @param kwSet number of the keyword set (integer)
         @return string giving the keywords (string) or None
         """
@@ -153,21 +150,21 @@
                 " sub-page tab tab-bar tear tearoff text title up-arrow"
                 " up-button"
             )
-        
+
         return None
-    
+
     def language(self):
         """
         Public method to return the lexer language.
-        
+
         @return lexer language (string)
         """
         return "QSS"
-    
+
     def lexerName(self):
         """
         Public method to return the lexer name.
-        
+
         @return lexer name (string)
         """
         return "QSS"

eric ide

mercurial