Esempio n. 1
0
    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
        """
        if kwSet == 1:
            if self.language() in ["Python", "Python2"]:
                keywords = ("and as assert break class continue def del elif "
                            "else except exec finally for from global if "
                            "import in is lambda not or pass print raise "
                            "return try while with yield")
            elif self.language() == "Python3":
                keywords = ("False None True and as assert break class "
                            "continue def del elif else except finally for "
                            "from global if import in is lambda nonlocal not "
                            "or pass raise return try while with yield")
            elif self.language() == "Cython":
                keywords = ("False None True and as assert break class "
                            "continue def del elif else except finally for "
                            "from global if import in is lambda nonlocal not "
                            "or pass raise return try while with yield "
                            "cdef cimport cpdef ctypedef")
            else:
                keywords = QsciLexerPython.keywords(self, kwSet)
        else:
            keywords = QsciLexerPython.keywords(self, kwSet)

        return keywords
Esempio n. 2
0
 def keywords(self, keyset):
     """return standard keywords and extra keywords."""
     if keyset == 1:
         return ' '.join(self.extraKeywords1) + ' ' + QsciLexerPython.keywords(self, keyset)
     elif keyset == 2:
         return ' '.join(self.extraKeywords2)
     return QsciLexerPython.keywords(self, keyset)
Esempio n. 3
0
 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
     """
     return QsciLexerPython.keywords(self, kwSet)
Esempio n. 4
0
 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
     """
     return QsciLexerPython.keywords(self, kwSet)
Esempio n. 5
0
 def keywords(self, order: int) -> str:
     if order == 2:
         return "self True False"
     else:
         return QsciLexerPython.keywords(self, order)
Esempio n. 6
0
 def keywords(self, set: int) -> str:
     if set == 2:
         return "self True False"
     else:
         return QsciLexerPython.keywords(self, set)
Esempio n. 7
0
 def keywords(self, s):
     if s == 2:#HighlightedIdentifier
         return BUILTINS_FUNC
     if s == 1:#Keyword
         return QsciLexerPython.keywords(self, s) + ' self'
     return QsciLexerPython.keywords(self, s)
Esempio n. 8
0
 def keywords(self, index):
     keywords = QsciLexerPython.keywords(self, index) or ''
     if index == 1:
         return 'self ' + ' super ' + keywords
Esempio n. 9
0
 def keywords(self, index):
     keywords = QsciLexerPython.keywords(self, index) or ""
     if index == 1:
         return "self " + " super " + keywords