44from builtins import str as text
55
66from future .utils import iteritems
7- from PyQt5 .Qsci import QsciLexerCustom , QsciScintilla
7+
8+ from .. import Qsci , QsciScintilla
89
910MS_KEYWORDS = """
1011if then else not and or key collect
1718"""
1819
1920
20- class MaxscriptLexer (QsciLexerCustom ):
21+ class MaxscriptLexer (Qsci . QsciLexerCustom ):
2122 # Items in this list will be highligheded using the color for self.SmartHighlight
2223 highlightedKeywords = ''
2324
2425 def __init__ (self , parent = None ):
25- QsciLexerCustom . __init__ ( self , parent )
26+ super ( MaxscriptLexer , self ). __init__ ( parent )
2627 self ._styles = {
2728 0 : 'Default' ,
2829 1 : 'Comment' ,
@@ -56,7 +57,7 @@ def defaultColor(self, style):
5657 elif style == self .String :
5758 return QColor (180 , 140 , 30 )
5859
59- return QsciLexerCustom . defaultColor ( self , style )
60+ return super ( MaxscriptLexer , self ). defaultColor ( style )
6061
6162 def defaultPaper (self , style ):
6263 if style == self .SmartHighlight :
@@ -77,7 +78,7 @@ def keywords(self, style):
7778 return MS_KEYWORDS
7879 if style == self .SmartHighlight :
7980 return self .highlightedKeywords
80- return QsciLexerCustom . keywords ( self , style )
81+ return super ( MaxscriptLexer , self ). keywords ( style )
8182
8283 def processChunk (self , chunk , lastState , keywords ):
8384 # process the length of the chunk
0 commit comments