Adapted the import statements to the new structure. eric7 release-10.1.0

Mon, 24 Oct 2022 16:06:28 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 24 Oct 2022 16:06:28 +0200
branch
eric7
changeset 191
6798a98189da
parent 190
3104a5a3ea13
child 192
fd53f4cd1e9e

Adapted the import statements to the new structure.

AssistantEric/APIsManager.py file | annotate | diff | comparison | revisions
AssistantEric/Assistant.py file | annotate | diff | comparison | revisions
ChangeLog file | annotate | diff | comparison | revisions
PluginAssistantEric.py file | annotate | diff | comparison | revisions
PluginAssistantEric.zip file | annotate | diff | comparison | revisions
PluginEricAssistant.epj file | annotate | diff | comparison | revisions
--- a/AssistantEric/APIsManager.py	Wed Sep 21 16:59:53 2022 +0200
+++ b/AssistantEric/APIsManager.py	Mon Oct 24 16:06:28 2022 +0200
@@ -15,14 +15,13 @@
 with contextlib.suppress(ImportError):
     from PyQt6.QtSql import QSqlDatabase, QSqlQuery
 
-from EricWidgets.EricApplication import ericApp
+from eric7 import Globals, Preferences, Utilities
 
-import QScintilla.Lexers
+from eric7.EricWidgets.EricApplication import ericApp
 
-import Globals
-import Utilities.ModuleParser
-import Utilities
-import Preferences
+from eric7.QScintilla import Lexers
+
+from eric7.Utilities import ModuleParser
 
 WorkerStatusStarted = 2001
 WorkerStatusFinished = 2002
@@ -116,8 +115,8 @@
         # supports. This has to be before we create a new thread, because
         # access to GUI elements is not allowed from non-GUI threads.
         self.__wseps = {}
-        for lang in QScintilla.Lexers.getSupportedLanguages():
-            lexer = QScintilla.Lexers.getLexer(lang)
+        for lang in Lexers.getSupportedLanguages():
+            lexer = Lexers.getLexer(lang)
             if lexer is not None:
                 self.__wseps[lang] = lexer.autoCompletionWordSeparators()
 
@@ -217,7 +216,7 @@
             classNameStr = "{0}{1}.".format(moduleName, className)
             for variable in sorted(_class.attributes.keys()):
                 if not _class.attributes[variable].isPrivate():
-                    from QScintilla.Editor import Editor
+                    from eric7.QScintilla.Editor import Editor
 
                     if _class.attributes[variable].isPublic():
                         iconId = Editor.AttributeID
@@ -240,14 +239,14 @@
 
         if self.__language == ApisNameProject:
             with contextlib.suppress(OSError, ImportError):
-                module = Utilities.ModuleParser.readModule(
+                module = ModuleParser.readModule(
                     os.path.join(self.__projectPath, apiFile),
                     basename=self.__projectPath + os.sep,
                     caching=False,
                 )
                 language = module.getType()
                 if language:
-                    from DocumentationTools.APIGenerator import APIGenerator
+                    from eric7.DocumentationTools.APIGenerator import APIGenerator
 
                     apiGenerator = APIGenerator(module)
                     apis = apiGenerator.genAPI(True, "", True)
@@ -711,7 +710,7 @@
             self.__discardFirst = ["self", "cls"]
         else:
             self.__discardFirst = []
-        self.__lexer = QScintilla.Lexers.getLexer(self.__language)
+        self.__lexer = Lexers.getLexer(self.__language)
         try:
             self.__apifiles = Preferences.getEditorAPI(
                 self.__language, projectType=self.__projectType
@@ -1236,7 +1235,7 @@
             self.__discardFirst = ["self", "cls"]
         else:
             self.__discardFirst = []
-        self.__lexer = QScintilla.Lexers.getLexer(self.__project.getProjectLanguage())
+        self.__lexer = Lexers.getLexer(self.__project.getProjectLanguage())
         self.__openAPIs()
 
     def __projectClosed(self):
@@ -1324,7 +1323,7 @@
             return self.__apis[(language, projectType)]
         except KeyError:
             if (
-                language in QScintilla.Lexers.getSupportedApiLanguages()
+                language in Lexers.getSupportedApiLanguages()
                 or language == ApisNameProject
             ):
                 # create the api object
--- a/AssistantEric/Assistant.py	Wed Sep 21 16:59:53 2022 +0200
+++ b/AssistantEric/Assistant.py	Mon Oct 24 16:06:28 2022 +0200
@@ -13,7 +13,7 @@
 
 from PyQt6.QtCore import QObject
 
-from EricWidgets.EricApplication import ericApp
+from eric7.EricWidgets.EricApplication import ericApp
 
 from .APIsManager import APIsManager, ApisNameProject
 
@@ -50,7 +50,7 @@
         self.__lastContext = None
         self.__lastFullContext = None
 
-        from QScintilla.Editor import Editor
+        from eric7.QScintilla.Editor import Editor
 
         self.__fromDocumentID = Editor.FromDocumentID
 
@@ -188,7 +188,7 @@
         @param txt the selected text
         @type str
         """
-        from QScintilla.Editor import EditorAutoCompletionListID
+        from eric7.QScintilla.Editor import EditorAutoCompletionListID
 
         if userListId == EditorAutoCompletionListID:
             lst = txt.split()
@@ -298,7 +298,7 @@
                     col -= 1
             prefix = editor.getWordLeft(line, col)
             if editor.isPyFile():
-                from Utilities.ModuleParser import Module
+                from eric7.Utilities.ModuleParser import Module
 
                 src = editor.text()
                 fn = editor.getFileName()
@@ -572,7 +572,7 @@
 
         prefixFound = False
         if prefix and module:
-            from QScintilla.Editor import Editor
+            from eric7.QScintilla.Editor import Editor
 
             line, col = editor.getCursorPosition()
             if prefix in ["cls", "self"]:
@@ -826,7 +826,7 @@
                     col -= 1
             prefix = editor.getWordLeft(line, col)
             if editor.isPyFile():
-                from Utilities.ModuleParser import Module
+                from eric7.Utilities.ModuleParser import Module
 
                 src = editor.text()
                 fn = editor.getFileName()
--- a/ChangeLog	Wed Sep 21 16:59:53 2022 +0200
+++ b/ChangeLog	Mon Oct 24 16:06:28 2022 +0200
@@ -1,5 +1,9 @@
 ChangeLog
 ---------
+Version 10.1.0:
+- bug fixes
+- adapted the import statements to the new structure
+
 Version 10.0.2:
 - adapted to the latest eric7 changes
 
--- a/PluginAssistantEric.py	Wed Sep 21 16:59:53 2022 +0200
+++ b/PluginAssistantEric.py	Mon Oct 24 16:06:28 2022 +0200
@@ -11,9 +11,9 @@
 
 from PyQt6.QtCore import QObject, QTranslator, QCoreApplication
 
-from EricWidgets.EricApplication import ericApp
+from eric7.EricWidgets.EricApplication import ericApp
 
-import Preferences
+from eric7 import Preferences
 
 from AssistantEric.Assistant import AcsAPIs, AcsProject
 
@@ -22,7 +22,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "10.0.2"
+version = "10.1.0"
 className = "AssistantEricPlugin"
 packageName = "AssistantEric"
 shortDescription = "Alternative autocompletion and calltips provider."
Binary file PluginAssistantEric.zip has changed
--- a/PluginEricAssistant.epj	Wed Sep 21 16:59:53 2022 +0200
+++ b/PluginEricAssistant.epj	Mon Oct 24 16:06:28 2022 +0200
@@ -227,6 +227,8 @@
       "AssistantEric/Assistant.py",
       "AssistantEric/ConfigurationPages/AutoCompletionEricPage.py",
       "AssistantEric/ConfigurationPages/CallTipsEricPage.py",
+      "AssistantEric/ConfigurationPages/Ui_AutoCompletionEricPage.py",
+      "AssistantEric/ConfigurationPages/Ui_CallTipsEricPage.py",
       "AssistantEric/ConfigurationPages/__init__.py",
       "AssistantEric/__init__.py",
       "PluginAssistantEric.py",
@@ -255,6 +257,7 @@
       "AssistantEric/i18n/assistant_zh_CN.GB2312.ts"
     ],
     "TRANSLATIONSBINPATH": "",
+    "TRANSLATIONSOURCESTARTPATH": "",
     "UICPARAMS": {
       "Package": "",
       "PackagesRoot": "",

eric ide

mercurial