--- a/src/eric7/Preferences/ConfigurationPages/EditorKeywordsPage.py Tue Oct 18 16:05:20 2022 +0200 +++ b/src/eric7/Preferences/ConfigurationPages/EditorKeywordsPage.py Tue Oct 18 16:06:21 2022 +0200 @@ -9,12 +9,12 @@ from PyQt6.QtCore import pyqtSlot -from EricWidgets import EricMessageBox +from eric7.EricWidgets import EricMessageBox from .ConfigurationPageBase import ConfigurationPageBase from .Ui_EditorKeywordsPage import Ui_EditorKeywordsPage -import Preferences +from eric7 import Preferences class EditorKeywordsPage(ConfigurationPageBase, Ui_EditorKeywordsPage): @@ -33,8 +33,8 @@ self.setObjectName("EditorKeywordsPage") # set initial values - import QScintilla.Lexers - from QScintilla.Lexers.LexerContainer import LexerContainer + from eric7.QScintilla import Lexers + from eric7.QScintilla.Lexers.LexerContainer import LexerContainer self.__keywords = { "": { @@ -44,12 +44,10 @@ } } - languages = sorted( - [""] + list(QScintilla.Lexers.getSupportedLanguages().keys()) - ) + languages = sorted([""] + list(Lexers.getSupportedLanguages().keys())) for lang in languages: if lang: - lex = QScintilla.Lexers.getLexer(lang) + lex = Lexers.getLexer(lang) if isinstance(lex, LexerContainer): continue keywords = Preferences.getEditorKeywords(lang)[:] @@ -85,9 +83,7 @@ "DefaultSets": defaults, "MaxSets": lex.maximumKeywordSet(), } - self.languageCombo.addItem( - QScintilla.Lexers.getLanguageIcon(lang, False), lang - ) + self.languageCombo.addItem(Lexers.getLanguageIcon(lang, False), lang) self.currentLanguage = "" self.currentSet = 1