diff -r 96bb40e987f7 -r 47804e8cde27 QScintilla/Lexers/LexerPython.py --- a/QScintilla/Lexers/LexerPython.py Sun Mar 17 12:18:40 2019 +0100 +++ b/QScintilla/Lexers/LexerPython.py Sun Mar 17 14:12:00 2019 +0100 @@ -11,7 +11,6 @@ import re -from PyQt5.QtCore import QCoreApplication from PyQt5.Qsci import QsciLexerPython, QsciScintilla from .SubstyledLexer import SubstyledLexer @@ -45,10 +44,9 @@ self.defaultSubStyles = { 11: { 0: { - "Description": QCoreApplication.translate( - "LexerPython", "Standard Library Modules"), + "Description": self.tr("Standard Library Modules"), "Words": """ -__main__ _dummy_thread _thread abc aifc argparse array ast asynchat asyncio + __main__ _dummy_thread _thread abc aifc argparse array ast asynchat asyncio asyncore atexit audioop base64 bdb binascii binhex bisect builtins bz2 calendar cgi cgitb chunk cmath cmd code codecs codeop collections colorsys compileall concurrent configparser contextlib copy copyreg crypt csv ctypes @@ -74,16 +72,29 @@ } }, 1: { - "Description": QCoreApplication.translate( - "LexerPython", "__future__ Imports"), + "Description": self.tr("__future__ Imports"), "Words": """ -__future__ with_statement unicode_literals print_function division + __future__ with_statement unicode_literals print_function division absolute_import generator_stop annotations""", "Style": { "fore": 0xEE00AA, "font_italic": True, } - } + }, + 2: { + "Description": self.tr("PyQt5 Modules"), + "Words": """ + PyQt5 Qsci Qt QtCore QtDBus QtDesigner QtGui QtHelp QtLocation QtMacExtras + QtMultimedia QtMultimediaWidgets QtNetwork QtNetworkAuth QtNfc QtOpenGL + QtPositioning QtPrintSupport QtQml QtQuick QtQuickWidgets QtRemoteObjects + QtSensors QtSerialPort QtSql QtSvg QtTest QtWebChannel QtWebEngine + QtWebEngineCore QtWebEngineWidgets QtWebSockets QtWidgets QtWinExtras + QtX11Extras QtXml QtXmlPatterns sip QtWebKit QtWebKitWidgets""", + "Style": { + "fore": 0x44AADD, + "font_bold": True, + } + }, }, }