original_docstring: Configure the QScintilla lexer using @data qt-scintilla-styles.
docstring: Configure the QScintilla lexer using @data qt-scintilla-styles.
docstring_tokens: Configure the QScintilla lexer using @data qt - scintilla - styles .
code: def configure_lexer(self, lexer):
          """Configure the QScintilla lexer using @data qt-scintilla-styles."""
          c = self.c
          qcolor, qfont = QtGui.QColor, QtGui.QFont
          font = qfont("DejaVu Sans Mono", 14)
          lexer.setFont(font)
          lexer.setEolFill(False, -1)
          if hasattr(lexer, 'setStringsOverNewlineAllowed'):
              lexer.setStringsOverNewlineAllowed(False)
          table: List[Tuple[str, str]] = []
          aList = c.config.getData('qt-scintilla-styles')
          if aList:
              aList = [s.split(',') for s in aList]
              for z in aList:
                  if len(z) == 2:
                      color, style = z
                      table.append((color.strip(), style.strip()),)
                  else: g.trace(f"entry: {z}")
          if not table:
              black = '#000000'
              firebrick3 = '#CD2626'
              leo_green = '#00aa00'
              # See http://pyqt.sourceforge.net/Docs/QScintilla2/classQsciLexerPython.html
              # for list of selector names.
              table = [
                  # EKR's personal settings are reasonable defaults.
                  (black, 'ClassName'),
                  (firebrick3, 'Comment'),
                  (leo_green, 'Decorator'),
                  (leo_green, 'DoubleQuotedString'),
                  (black, 'FunctionMethodName'),
                  ('blue', 'Keyword'),
                  (black, 'Number'),
                  (leo_green, 'SingleQuotedString'),
                  (leo_green, 'TripleSingleQuotedString'),
                  (leo_green, 'TripleDoubleQuotedString'),
                  (leo_green, 'UnclosedString'),
                  # End of line where string is not closed
                  # style.python.13=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled
              ]
          for color, style in table:
              if hasattr(lexer, style):
                  style_number = getattr(lexer, style)
                  try:
                      lexer.setColor(qcolor(color), style_number)
                  except Exception:
                      g.trace('bad color', color)
              else:
                  pass
                  # Not an error. Not all lexers have all styles.
                      # g.trace('bad style: %s.%s' % (lexer.__class__.__name__, style))
code_tokens: def configure_lexer ( self , lexer ) : c = self . c qcolor , qfont = QtGui . QColor , QtGui . QFont font = qfont ( "DejaVu Sans Mono" , 14 ) lexer . setFont ( font ) lexer . setEolFill ( False , - 1 ) if hasattr ( lexer , 'setStringsOverNewlineAllowed' ) : lexer . setStringsOverNewlineAllowed ( False ) table : List [ Tuple [ str , str ] ] = [ ] aList = c . config . getData ( 'qt-scintilla-styles' ) if aList : aList = [ s . split ( ',' ) for s in aList ] for z in aList : if len ( z ) == 2 : color , style = z table . append ( ( color . strip ( ) , style . strip ( ) ) , ) else : g . trace ( f"entry: {z}" ) if not table : black = '#000000' firebrick3 = '#CD2626' leo_green = '#00aa00' table = [ ( black , 'ClassName' ) , ( firebrick3 , 'Comment' ) , ( leo_green , 'Decorator' ) , ( leo_green , 'DoubleQuotedString' ) , ( black , 'FunctionMethodName' ) , ( 'blue' , 'Keyword' ) , ( black , 'Number' ) , ( leo_green , 'SingleQuotedString' ) , ( leo_green , 'TripleSingleQuotedString' ) , ( leo_green , 'TripleDoubleQuotedString' ) , ( leo_green , 'UnclosedString' ) , ] for color , style in table : if hasattr ( lexer , style ) : style_number = getattr ( lexer , style ) try : lexer . setColor ( qcolor ( color ) , style_number ) except Exception : g . trace ( 'bad color' , color ) else : pass
short_docstring: Configure the QScintilla lexer using @data qt-scintilla-styles.
short_docstring_tokens: Configure the QScintilla lexer using @data qt - scintilla - styles .
comment: """Configure the QScintilla lexer using @data qt-scintilla-styles."""$SEP$# See http://pyqt.sourceforge.net/Docs/QScintilla2/classQsciLexerPython.html$SEP$# for list of selector names.$SEP$# EKR's personal settings are reasonable defaults.$SEP$# End of line where string is not closed$SEP$# style.python.13=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled$SEP$# Not an error. Not all lexers have all styles.$SEP$# g.trace('bad style: %s.%s' % (lexer.__class__.__name__, style))