Tue, 25 May 2021 17:48:25 +0200
Ported the plug-in to PyQt6 for eric7.
--- a/.hgignore Tue May 25 17:22:05 2021 +0200 +++ b/.hgignore Tue May 25 17:48:25 2021 +0200 @@ -1,7 +1,5 @@ -glob:.eric5project -glob:_eric5project glob:.eric6project -glob:_eric6project +glob:.eric7project glob:.ropeproject glob:_ropeproject glob:.directory
--- a/AssistantEric/APIsManager.py Tue May 25 17:22:05 2021 +0200 +++ b/AssistantEric/APIsManager.py Tue May 25 17:48:25 2021 +0200 @@ -10,13 +10,13 @@ import contextlib import os -from PyQt5.QtCore import ( +from PyQt6.QtCore import ( QTimer, QThread, QFileInfo, pyqtSignal, QDateTime, QObject, Qt ) with contextlib.suppress(ImportError): - from PyQt5.QtSql import QSqlDatabase, QSqlQuery + from PyQt6.QtSql import QSqlDatabase, QSqlQuery -from E5Gui.E5Application import e5App +from EricWidgets.EricApplication import ericApp import QScintilla.Lexers @@ -134,8 +134,10 @@ """ Private method to get the word separator characters for a language. - @param language language of the APIs object (string) - @return word separator characters (list of strings) + @param language language of the APIs object + @type str + @return word separator characters + @rtype list of str """ if language: return self.__wseps.get(language, None) @@ -153,7 +155,8 @@ Private method to load an API file, if it is newer than the one read into the database. - @param apiFile filename of the raw API file (string) + @param apiFile filename of the raw API file + @type str """ db = QSqlDatabase.database(self.__connectionName) db.transaction() @@ -192,8 +195,10 @@ """ Private method to generate class api section for class attributes. - @param module module object to get the info from (Module) - @return API information (list of strings) + @param module module object to get the info from + @type Module + @return API information + @rtype list of str """ api = [] modulePath = module.name.split('.') @@ -219,7 +224,8 @@ """ Private method to read a raw API file into the database. - @param apiFile filename of the raw API file (string) + @param apiFile filename of the raw API file + @type str """ apis = [] bases = [] @@ -271,7 +277,8 @@ Doing this avoids rereading the file whenever the API is initialized in case the given file doesn't contain API data. - @param apiFile file name of the API file (string) + @param apiFile file name of the API file + @type str """ db = QSqlDatabase.database(self.__connectionName) db.transaction() @@ -299,10 +306,14 @@ """ Private method to put the API entries into the database. - @param apis list of api entries (list of strings) - @param bases list of base class entries (list of strings) - @param apiFile filename of the file read to get the APIs (string) - @param language programming language of the file of the APIs (string) + @param apis list of api entries + @type list of str + @param bases list of base class entries + @type list of str + @param apiFile filename of the file read to get the APIs + @type str + @param language programming language of the file of the APIs + @type str """ wseps = self.__autoCompletionWordSeparators(language) if wseps is None: @@ -429,7 +440,8 @@ """ Private method to delete all references to an api file. - @param apiFile filename of the raw API file (string) + @param apiFile filename of the raw API file + @type str """ db = QSqlDatabase.database(self.__connectionName) db.transaction() @@ -670,7 +682,7 @@ """ self.__lexer = None - self.__project = e5App().getObject("Project") + self.__project = ericApp().getObject("Project") self.__project.projectOpened.connect(self.__projectOpened) self.__project.newProject.connect(self.__projectOpened) self.__project.projectClosed.connect(self.__projectClosed) @@ -703,7 +715,8 @@ """ Protected method to determine the name of the database file. - @return name of the database file (string) + @return name of the database file + @rtype str """ if self.__language == ApisNameProject: return os.path.join(self.__project.getProjectManagementDir(), @@ -747,7 +760,8 @@ """ Private method to open the API database. - @return flag indicating the database status (boolean) + @return flag indicating the database status + @rtype bool """ db = QSqlDatabase.database(self.__connectionName, False) if not db.isValid(): @@ -808,7 +822,8 @@ """ Public method to get a list of API files loaded into the database. - @return list of API filenames (list of strings) + @return list of API filenames + @rtype list of str """ apiFiles = [] @@ -830,7 +845,8 @@ """ Private method to check, if the database has been prepared. - @return flag indicating the prepared status (boolean) + @return flag indicating the prepared status + @rtype bool """ db = QSqlDatabase.database(self.__connectionName) prepared = len(db.tables()) > 0 @@ -855,16 +871,20 @@ """ Public method to determine the possible completions. - @keyparam start string giving the start of the word to be - completed (string) - @keyparam context string giving the context (e.g. classname) - to be completed (string) - @keyparam followHierarchy flag indicating to follow the hierarchy of - base classes (boolean) + @param start string giving the start of the word to be + completed + @type str + @param context string giving the context (e.g. classname) + to be completed + @type str + @param followHierarchy flag indicating to follow the hierarchy of + base classes + @type bool @return list of dictionaries with possible completions - (key 'completion' contains the completion (string), - key 'context' contains the context (string) and - key 'pictureId' contains the ID of the icon to be shown (string)) + (key 'completion' contains the completion, + key 'context' contains the context and + key 'pictureId' contains the ID of the icon to be shown) + @rtype list of dict """ completions = [] @@ -921,16 +941,21 @@ """ Public method to determine the calltips. - @param acWord function to get calltips for (string) + @param acWord function to get calltips for + @type str @param commas minimum number of commas contained in the calltip - (integer) - @param context string giving the context (e.g. classname) (string) - @param fullContext string giving the full context (string) + @type int + @param context string giving the context (e.g. classname) + @type str + @param fullContext string giving the full context + @type str @param showContext flag indicating to show the calltip context - (boolean) - @keyparam followHierarchy flag indicating to follow the hierarchy of - base classes (boolean) - @return list of calltips (list of string) + @type bool + @param followHierarchy flag indicating to follow the hierarchy of + base classes + @type bool + @return list of calltips + @rtype list of str """ calltips = [] @@ -1004,9 +1029,12 @@ Private method to determine, if the given string contains enough commas. - @param s string to check (string) - @param commas number of commas to check for (integer) - @return flag indicating, that there are enough commas (boolean) + @param s string to check + @type str + @param commas number of commas to check for + @type int + @return flag indicating, that there are enough commas + @rtype bool """ end = s.find(')') @@ -1032,11 +1060,14 @@ """ Private method to get the source files for the project forms. - @keyparam normalized flag indicating a normalized filename is wanted - (boolean) - @return list of project form sources (list of strings) + @param normalized flag indicating a normalized filename is wanted + @type bool + @return list of project form sources + @rtype list of str """ - if self.__project.getProjectLanguage() == "Python3": + if self.__project.getProjectLanguage() in ( + "Python3", "MicroPython", "Cython" + ): sourceExt = ".py" elif self.__project.getProjectLanguage() == "Ruby": sourceExt = ".rb" @@ -1059,7 +1090,8 @@ """ Public method to prepare the APIs if neccessary. - @keyparam rawList list of raw API files (list of strings) + @param rawList list of raw API files + @type list of str """ if self.__inPreparation: return @@ -1075,12 +1107,8 @@ projectPath = self.__project.getProjectPath() projectType = "" else: - try: - apiFiles = Preferences.getEditorAPI( - self.__language, projectType=self.__projectType) - except TypeError: - # older interface - apiFiles = Preferences.getEditorAPI(self.__language) + apiFiles = Preferences.getEditorAPI( + self.__language, projectType=self.__projectType) projectType = self.__projectType self.__worker = DbAPIsWorker(self, self.__language, apiFiles, self._apiDbName(), projectPath, @@ -1117,7 +1145,8 @@ """ Public method to return a reference to our lexer object. - @return reference to the lexer object (QScintilla.Lexers.Lexer) + @return reference to the lexer object + @rtype Lexer """ return self.__lexer @@ -1125,7 +1154,8 @@ """ Public method to get the word separator characters. - @return word separator characters (list of strings) + @return word separator characters + @rtype list of str """ if self.__lexer: return self.__lexer.autoCompletionWordSeparators() @@ -1136,8 +1166,10 @@ Private slot handling the processing signal of the API preparation thread. - @param status preparation status (integer, one of WorkerStatus...) - @param filename name of the file being processed (string) + @param status preparation status (one of WorkerStatus...) + @type int + @param filename name of the file being processed + @type str """ if status == WorkerStatusStarted: self.__inPreparation = True @@ -1165,7 +1197,9 @@ """ Private slot to perform actions after a project has been opened. """ - if self.__project.getProjectLanguage() == "Python3": + if self.__project.getProjectLanguage() in ( + "Python3", "MicroPython", "Cython" + ): self.__discardFirst = ["self", "cls"] else: self.__discardFirst = [] @@ -1183,7 +1217,8 @@ """ Private slot to handle the projectFormCompiled signal. - @param filename name of the form file that was compiled (string) + @param filename name of the form file that was compiled + @type str """ self.__workerQueue.append(filename) self.__processQueue() @@ -1200,7 +1235,8 @@ """ Public slot to handle the editorSaved signal. - @param filename name of the file that was saved (string) + @param filename name of the file that was saved + @type str """ if self.__project.isProjectSource(filename): self.__workerQueue.append(filename) @@ -1216,8 +1252,10 @@ """ Constructor - @param mainWindow reference to the main eric6 window (QMainWindow) - @param parent reference to the parent object (QObject) + @param mainWindow reference to the main eric7 window + @type QMainWindow + @param parent reference to the parent object + @type QObject """ QObject.__init__(self, parent) self.setObjectName("Assistant_APIsManager") @@ -1277,7 +1315,8 @@ """ Private message to show a message in the main windows status bar. - @param msg message to be shown (string) + @param msg message to be shown + @type str """ if msg: self.__mw.statusBar().showMessage(msg, 2000) @@ -1286,9 +1325,12 @@ """ Private slot handling the preparation status signal of an API object. - @param language language of the API (string) - @param status preparation status (integer, one of WorkerStatus...) - @param filename name of the file being processed (string) + @param language language of the API + @type str + @param status preparation status (one of WorkerStatus...) + @type int + @param filename name of the file being processed + @type str """ if language == ApisNameProject: language = self.tr("Project")
--- a/AssistantEric/Assistant.py Tue May 25 17:22:05 2021 +0200 +++ b/AssistantEric/Assistant.py Tue May 25 17:48:25 2021 +0200 @@ -11,9 +11,9 @@ import re import imp -from PyQt5.QtCore import QRegExp, QObject +from PyQt6.QtCore import QObject -from E5Gui.E5Application import e5App +from EricWidgets.EricApplication import ericApp from .APIsManager import APIsManager, ApisNameProject @@ -31,15 +31,17 @@ Constructor @param plugin reference to the plugin object - @param parent parent (QObject) + @type AssistantEricPlugin + @param parent parent + @type QObject """ QObject.__init__(self, parent) self.__plugin = plugin self.__ui = parent - self.__project = e5App().getObject("Project") - self.__viewmanager = e5App().getObject("ViewManager") - self.__pluginManager = e5App().getObject("PluginManager") + self.__project = ericApp().getObject("Project") + self.__viewmanager = ericApp().getObject("ViewManager") + self.__pluginManager = ericApp().getObject("PluginManager") self.__apisManager = APIsManager(self.__ui, self) @@ -93,8 +95,10 @@ """ Public method to enable or disable a feature. - @param key feature to set (string) - @param enabled flag indicating the status (boolean) + @param key feature to set + @type str + @param enabled flag indicating the status + @type bool """ for editor in self.__editors[:]: self.__editorClosed(editor) @@ -105,7 +109,8 @@ """ Private slot called, when a new editor was opened. - @param editor reference to the new editor (QScintilla.Editor) + @param editor reference to the new editor + @type Editor """ if self.__plugin.getPreferences("AutoCompletionEnabled"): self.__setAutoCompletionHook(editor) @@ -125,7 +130,8 @@ """ Private slot called, when an editor was closed. - @param editor reference to the editor (QScintilla.Editor) + @param editor reference to the editor + @type Editor """ if editor in self.__editors: editor.editorSaved.disconnect( @@ -171,8 +177,10 @@ Private slot to handle the selection from the completion list to record the selected completion context. - @param userListId the ID of the user list (should be 1) (integer) - @param txt the selected text (string) + @param userListId the ID of the user list (should be 1) + @type int + @param txt the selected text + @type str """ from QScintilla.Editor import EditorAutoCompletionListID @@ -187,7 +195,8 @@ """ Private method to set the autocompletion hook. - @param editor reference to the editor (QScintilla.Editor) + @param editor reference to the editor + @type Editor """ editor.userListActivated.connect(self.__recordSelectedContext) editor.addCompletionListHook("Assistant", self.getCompletionsList) @@ -196,7 +205,8 @@ """ Private method to unset the autocompletion hook. - @param editor reference to the editor (QScintilla.Editor) + @param editor reference to the editor + @type Editor """ editor.userListActivated.disconnect(self.__recordSelectedContext) editor.removeCompletionListHook("Assistant") @@ -206,9 +216,11 @@ Public method to get a list of possible completions. @param editor reference to the editor object, that called this method - (QScintilla.Editor) - @param context flag indicating to autocomplete a context (boolean) - @return list of possible completions (list of strings) + @type Editor + @param context flag indicating to autocomplete a context + @type bool + @return list of possible completions + @rtype list of str """ language = editor.getApiLanguage() completeFromDocumentOnly = False @@ -342,18 +354,28 @@ """ Private method to get the list of possible completions. - @param word word (or wordpart) to complete (string) - @param context flag indicating to autocomplete a context (boolean) - @param prefix prefix of the word to be completed (string) - @param language programming language of the source (string) - @param projectType type of the project (string) - @param module reference to the scanned module info (Module) - @param editor reference to the editor object (QScintilla.Editor.Editor) - @param importCompletion flag indicating an import completion (boolean) + @param word word (or wordpart) to complete + @type str + @param context flag indicating to autocomplete a context + @type bool + @param prefix prefix of the word to be completed + @type str + @param language programming language of the source + @type str + @param projectType type of the project + @type str + @param module reference to the scanned module info + @type Module + @param editor reference to the editor object + @type Editor + @param importCompletion flag indicating an import completion + @type bool @param documentOnly flag indicating to complete from the document only - (boolean) - @param sep separator string (string) - @return list of possible completions (list of strings) + @type bool + @param sep separator string + @type str + @return list of possible completions + @rtype list of str """ apiCompletionsList = [] docCompletionsList = [] @@ -393,13 +415,20 @@ """ Private method to determine a list of completions from an API object. - @param api reference to the API object to be used (APIsManager.DbAPIs) - @param word word (or wordpart) to complete (string) - @param context flag indicating to autocomplete a context (boolean) - @param prefix prefix of the word to be completed (string) - @param module reference to the scanned module info (Module) - @param editor reference to the editor object (QScintilla.Editor.Editor) - @return list of possible completions (list of strings) + @param api reference to the API object to be used + @type APIsManager.DbAPIs + @param word word (or wordpart) to complete + @type str + @param context flag indicating to autocomplete a context + @type bool + @param prefix prefix of the word to be completed + @type str + @param module reference to the scanned module info + @type Module + @param editor reference to the editor object + @type Editor + @return list of possible completions + @rtype list of str """ completionsList = [] if api is not None: @@ -446,10 +475,10 @@ entry += "?{0}".format(completion["pictureId"]) else: cont = False - re = QRegExp( - QRegExp.escape(entry) + "\?\d{,2}") + regexp = re.compile( + re.escape(entry) + r"\?\d{,2}") for comp in completionsList: - if re.exactMatch(comp): + if regexp.fullmatchS(comp): cont = True break if cont: @@ -487,9 +516,9 @@ entry += "?{0}".format(completion["pictureId"]) else: cont = False - re = QRegExp(QRegExp.escape(entry) + "\?\d{,2}") + regexp = re.compile(re.escape(entry) + "\?\d{,2}") for comp in completionsList: - if re.exactMatch(comp): + if regexp.fullmatch(comp): cont = True break if cont: @@ -503,14 +532,22 @@ """ Private method to determine autocompletion proposals from the document. - @param editor reference to the editor object (QScintilla.Editor.Editor) - @param word string to be completed (string) - @param context flag indicating to autocomplete a context (boolean) - @param sep separator string (string) - @param prefix prefix of the word to be completed (string) - @param module reference to the scanned module info (Module) - @keyparam doHierarchy flag indicating a hierarchical search (boolean) - @return list of possible completions (list of strings) + @param editor reference to the editor object + @type Editor + @param word string to be completed + @type str + @param context flag indicating to autocomplete a context + @type bool + @param sep separator string + @type str + @param prefix prefix of the word to be completed + @type str + @param module reference to the scanned module info + @type Module + @param doHierarchy flag indicating a hierarchical search + @type bool + @return list of possible completions + @rtype list of str """ completionsList = [] @@ -682,7 +719,8 @@ """ Private method to set the calltip hook. - @param editor reference to the editor (QScintilla.Editor) + @param editor reference to the editor + @type Editor """ editor.addCallTipHook("Assistant", self.calltips) @@ -690,7 +728,8 @@ """ Private method to unset the calltip hook. - @param editor reference to the editor (QScintilla.Editor) + @param editor reference to the editor + @type Editor """ editor.removeCallTipHook("Assistant") @@ -698,11 +737,14 @@ """ Public method to return a list of calltips. - @param editor reference to the editor (QScintilla.Editor) - @param pos position in the text for the calltip (integer) + @param editor reference to the editor + @type Editor + @param pos position in the text for the calltip + @type int @param commas minimum number of commas contained in the calltip - (integer) - @return list of possible calltips (list of strings) + @type int + @return list of possible calltips + @rtype list of str """ language = editor.getApiLanguage() completeFromDocumentOnly = False @@ -786,14 +828,20 @@ """ Private method to determine calltips from APIs. - @param api reference to the API object to be used (APIsManager.DbAPIs) - @param word function to get calltips for (string) + @param api reference to the API object to be used + @type APIsManager.DbAPIs + @param word function to get calltips for + @type str @param commas minimum number of commas contained in the calltip - (integer) - @param prefix prefix of the word to be completed (string) - @param module reference to the scanned module info (Module) - @param editor reference to the editor object (QScintilla.Editor) - @return list of calltips (list of string) + @type int + @param prefix prefix of the word to be completed + @type str + @param module reference to the scanned module info + @type Module + @param editor reference to the editor object + @type Editor + @return list of calltips + @rtype list of str """ calltips = [] if prefix and module and prefix == "self": @@ -823,12 +871,18 @@ """ Private method to determine calltips from the document. - @param word function to get calltips for (string) - @param prefix prefix of the word to be completed (string) - @param module reference to the scanned module info (Module) - @param editor reference to the editor object (QScintilla.Editor) - @keyparam doHierarchy flag indicating a hierarchical search (boolean) - @return list of calltips (list of string) + @param word function to get calltips for + @type str + @param prefix prefix of the word to be completed + @type str + @param module reference to the scanned module info + @type Module + @param editor reference to the editor object + @type Editor + @param doHierarchy flag indicating a hierarchical search + @type bool + @return list of calltips + @rtype list of str """ calltips = [] if module and bool(editor.getLexer()):
--- a/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.APIsManager.html Tue May 25 17:22:05 2021 +0200 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.APIsManager.html Tue May 25 17:48:25 2021 +0200 @@ -117,13 +117,13 @@ </p> <dl> -<dt><i>mainWindow</i></dt> +<dt><i>mainWindow</i> (QMainWindow)</dt> <dd> -reference to the main eric6 window (QMainWindow) +reference to the main eric7 window </dd> -<dt><i>parent</i></dt> +<dt><i>parent</i> (QObject)</dt> <dd> -reference to the parent object (QObject) +reference to the parent object </dd> </dl> <a NAME="APIsManager.__apiPreparationStatus" ID="APIsManager.__apiPreparationStatus"></a> @@ -135,17 +135,17 @@ </p> <dl> -<dt><i>language</i></dt> +<dt><i>language</i> (str)</dt> <dd> -language of the API (string) +language of the API </dd> -<dt><i>status</i></dt> +<dt><i>status</i> (int)</dt> <dd> -preparation status (integer, one of WorkerStatus...) +preparation status (one of WorkerStatus...) </dd> -<dt><i>filename</i></dt> +<dt><i>filename</i> (str)</dt> <dd> -name of the file being processed (string) +name of the file being processed </dd> </dl> <a NAME="APIsManager.__showMessage" ID="APIsManager.__showMessage"></a> @@ -157,9 +157,9 @@ </p> <dl> -<dt><i>msg</i></dt> +<dt><i>msg</i> (str)</dt> <dd> -message to be shown (string) +message to be shown </dd> </dl> <a NAME="APIsManager.deactivate" ID="APIsManager.deactivate"></a> @@ -387,19 +387,25 @@ </p> <dl> -<dt><i>s</i></dt> +<dt><i>s</i> (str)</dt> <dd> -string to check (string) +string to check </dd> -<dt><i>commas</i></dt> +<dt><i>commas</i> (int)</dt> <dd> -number of commas to check for (integer) +number of commas to check for </dd> </dl> <dl> <dt>Return:</dt> <dd> -flag indicating, that there are enough commas (boolean) +flag indicating, that there are enough commas +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool </dd> </dl> <a NAME="DbAPIs.__getProjectFormSources" ID="DbAPIs.__getProjectFormSources"></a> @@ -411,16 +417,21 @@ </p> <dl> -<dt><i>normalized=</i></dt> +<dt><i>normalized</i> (bool)</dt> <dd> flag indicating a normalized filename is wanted - (boolean) </dd> </dl> <dl> <dt>Return:</dt> <dd> -list of project form sources (list of strings) +list of project form sources +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="DbAPIs.__initAsLanguage" ID="DbAPIs.__initAsLanguage"></a> @@ -447,7 +458,13 @@ <dl> <dt>Return:</dt> <dd> -flag indicating the prepared status (boolean) +flag indicating the prepared status +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool </dd> </dl> <a NAME="DbAPIs.__openAPIs" ID="DbAPIs.__openAPIs"></a> @@ -467,7 +484,13 @@ <dl> <dt>Return:</dt> <dd> -flag indicating the database status (boolean) +flag indicating the database status +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool </dd> </dl> <a NAME="DbAPIs.__processQueue" ID="DbAPIs.__processQueue"></a> @@ -487,13 +510,13 @@ </p> <dl> -<dt><i>status</i></dt> +<dt><i>status</i> (int)</dt> <dd> -preparation status (integer, one of WorkerStatus...) +preparation status (one of WorkerStatus...) </dd> -<dt><i>filename</i></dt> +<dt><i>filename</i> (str)</dt> <dd> -name of the file being processed (string) +name of the file being processed </dd> </dl> <a NAME="DbAPIs.__projectChanged" ID="DbAPIs.__projectChanged"></a> @@ -519,9 +542,9 @@ </p> <dl> -<dt><i>filename</i></dt> +<dt><i>filename</i> (str)</dt> <dd> -name of the form file that was compiled (string) +name of the form file that was compiled </dd> </dl> <a NAME="DbAPIs.__projectOpened" ID="DbAPIs.__projectOpened"></a> @@ -541,7 +564,13 @@ <dl> <dt>Return:</dt> <dd> -name of the database file (string) +name of the database file +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +str </dd> </dl> <a NAME="DbAPIs.autoCompletionWordSeparators" ID="DbAPIs.autoCompletionWordSeparators"></a> @@ -554,7 +583,13 @@ <dl> <dt>Return:</dt> <dd> -word separator characters (list of strings) +word separator characters +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="DbAPIs.close" ID="DbAPIs.close"></a> @@ -573,9 +608,9 @@ </p> <dl> -<dt><i>filename</i></dt> +<dt><i>filename</i> (str)</dt> <dd> -name of the file that was saved (string) +name of the file that was saved </dd> </dl> <a NAME="DbAPIs.getApiFiles" ID="DbAPIs.getApiFiles"></a> @@ -588,7 +623,13 @@ <dl> <dt>Return:</dt> <dd> -list of API filenames (list of strings) +list of API filenames +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="DbAPIs.getCalltips" ID="DbAPIs.getCalltips"></a> @@ -600,38 +641,42 @@ </p> <dl> -<dt><i>acWord</i></dt> +<dt><i>acWord</i> (str)</dt> <dd> -function to get calltips for (string) +function to get calltips for </dd> -<dt><i>commas</i></dt> +<dt><i>commas</i> (int)</dt> <dd> minimum number of commas contained in the calltip - (integer) </dd> -<dt><i>context</i></dt> +<dt><i>context</i> (str)</dt> <dd> -string giving the context (e.g. classname) (string) +string giving the context (e.g. classname) </dd> -<dt><i>fullContext</i></dt> +<dt><i>fullContext</i> (str)</dt> <dd> -string giving the full context (string) +string giving the full context </dd> -<dt><i>showContext</i></dt> +<dt><i>showContext</i> (bool)</dt> <dd> flag indicating to show the calltip context - (boolean) </dd> -<dt><i>followHierarchy=</i></dt> +<dt><i>followHierarchy</i> (bool)</dt> <dd> flag indicating to follow the hierarchy of - base classes (boolean) + base classes </dd> </dl> <dl> <dt>Return:</dt> <dd> -list of calltips (list of string) +list of calltips +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="DbAPIs.getCompletions" ID="DbAPIs.getCompletions"></a> @@ -643,29 +688,35 @@ </p> <dl> -<dt><i>start=</i></dt> +<dt><i>start</i> (str)</dt> <dd> string giving the start of the word to be - completed (string) + completed </dd> -<dt><i>context=</i></dt> +<dt><i>context</i> (str)</dt> <dd> string giving the context (e.g. classname) - to be completed (string) + to be completed </dd> -<dt><i>followHierarchy=</i></dt> +<dt><i>followHierarchy</i> (bool)</dt> <dd> flag indicating to follow the hierarchy of - base classes (boolean) + base classes </dd> </dl> <dl> <dt>Return:</dt> <dd> list of dictionaries with possible completions - (key 'completion' contains the completion (string), - key 'context' contains the context (string) and - key 'pictureId' contains the ID of the icon to be shown (string)) + (key 'completion' contains the completion, + key 'context' contains the context and + key 'pictureId' contains the ID of the icon to be shown) +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of dict </dd> </dl> <a NAME="DbAPIs.getLexer" ID="DbAPIs.getLexer"></a> @@ -678,7 +729,13 @@ <dl> <dt>Return:</dt> <dd> -reference to the lexer object (QScintilla.Lexers.Lexer) +reference to the lexer object +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +Lexer </dd> </dl> <a NAME="DbAPIs.prepareAPIs" ID="DbAPIs.prepareAPIs"></a> @@ -690,9 +747,9 @@ </p> <dl> -<dt><i>rawList=</i></dt> +<dt><i>rawList</i> (list of str)</dt> <dd> -list of raw API files (list of strings) +list of raw API files </dd> </dl> <div align="right"><a href="#top">Up</a></div> @@ -828,15 +885,21 @@ </p> <dl> -<dt><i>language</i></dt> +<dt><i>language</i> (str)</dt> <dd> -language of the APIs object (string) +language of the APIs object </dd> </dl> <dl> <dt>Return:</dt> <dd> -word separator characters (list of strings) +word separator characters +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="DbAPIsWorker.__classesAttributesApi" ID="DbAPIsWorker.__classesAttributesApi"></a> @@ -848,15 +911,21 @@ </p> <dl> -<dt><i>module</i></dt> +<dt><i>module</i> (Module)</dt> <dd> -module object to get the info from (Module) +module object to get the info from </dd> </dl> <dl> <dt>Return:</dt> <dd> -API information (list of strings) +API information +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="DbAPIsWorker.__deleteApiFile" ID="DbAPIsWorker.__deleteApiFile"></a> @@ -868,9 +937,9 @@ </p> <dl> -<dt><i>apiFile</i></dt> +<dt><i>apiFile</i> (str)</dt> <dd> -filename of the raw API file (string) +filename of the raw API file </dd> </dl> <a NAME="DbAPIsWorker.__getApiFiles" ID="DbAPIsWorker.__getApiFiles"></a> @@ -901,9 +970,9 @@ </p> <dl> -<dt><i>apiFile</i></dt> +<dt><i>apiFile</i> (str)</dt> <dd> -filename of the raw API file (string) +filename of the raw API file </dd> </dl> <a NAME="DbAPIsWorker.__loadApiFileIfNewer" ID="DbAPIsWorker.__loadApiFileIfNewer"></a> @@ -916,9 +985,9 @@ </p> <dl> -<dt><i>apiFile</i></dt> +<dt><i>apiFile</i> (str)</dt> <dd> -filename of the raw API file (string) +filename of the raw API file </dd> </dl> <a NAME="DbAPIsWorker.__storeApis" ID="DbAPIsWorker.__storeApis"></a> @@ -930,21 +999,21 @@ </p> <dl> -<dt><i>apis</i></dt> +<dt><i>apis</i> (list of str)</dt> <dd> -list of api entries (list of strings) +list of api entries </dd> -<dt><i>bases</i></dt> +<dt><i>bases</i> (list of str)</dt> <dd> -list of base class entries (list of strings) +list of base class entries </dd> -<dt><i>apiFile</i></dt> +<dt><i>apiFile</i> (str)</dt> <dd> -filename of the file read to get the APIs (string) +filename of the file read to get the APIs </dd> -<dt><i>language</i></dt> +<dt><i>language</i> (str)</dt> <dd> -programming language of the file of the APIs (string) +programming language of the file of the APIs </dd> </dl> <a NAME="DbAPIsWorker.__storeFileInfoOnly" ID="DbAPIsWorker.__storeFileInfoOnly"></a> @@ -960,9 +1029,9 @@ </p> <dl> -<dt><i>apiFile</i></dt> +<dt><i>apiFile</i> (str)</dt> <dd> -file name of the API file (string) +file name of the API file </dd> </dl> <a NAME="DbAPIsWorker.abort" ID="DbAPIsWorker.abort"></a>
--- a/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.Assistant.html Tue May 25 17:22:05 2021 +0200 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.Assistant.html Tue May 25 17:48:25 2021 +0200 @@ -169,13 +169,13 @@ </p> <dl> -<dt><i>plugin</i></dt> +<dt><i>plugin</i> (AssistantEricPlugin)</dt> <dd> reference to the plugin object </dd> -<dt><i>parent</i></dt> +<dt><i>parent</i> (QObject)</dt> <dd> -parent (QObject) +parent </dd> </dl> <a NAME="Assistant.__editorClosed" ID="Assistant.__editorClosed"></a> @@ -187,9 +187,9 @@ </p> <dl> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the editor (QScintilla.Editor) +reference to the editor </dd> </dl> <a NAME="Assistant.__editorOpened" ID="Assistant.__editorOpened"></a> @@ -201,9 +201,9 @@ </p> <dl> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the new editor (QScintilla.Editor) +reference to the new editor </dd> </dl> <a NAME="Assistant.__getApiCalltips" ID="Assistant.__getApiCalltips"></a> @@ -215,36 +215,41 @@ </p> <dl> -<dt><i>api</i></dt> +<dt><i>api</i> (APIsManager.DbAPIs)</dt> <dd> -reference to the API object to be used (APIsManager.DbAPIs) +reference to the API object to be used </dd> -<dt><i>word</i></dt> +<dt><i>word</i> (str)</dt> <dd> -function to get calltips for (string) +function to get calltips for </dd> -<dt><i>commas</i></dt> +<dt><i>commas</i> (int)</dt> <dd> minimum number of commas contained in the calltip - (integer) </dd> -<dt><i>prefix</i></dt> +<dt><i>prefix</i> (str)</dt> <dd> -prefix of the word to be completed (string) +prefix of the word to be completed </dd> -<dt><i>module</i></dt> +<dt><i>module</i> (Module)</dt> <dd> -reference to the scanned module info (Module) +reference to the scanned module info </dd> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the editor object (QScintilla.Editor) +reference to the editor object </dd> </dl> <dl> <dt>Return:</dt> <dd> -list of calltips (list of string) +list of calltips +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="Assistant.__getApiCompletions" ID="Assistant.__getApiCompletions"></a> @@ -256,35 +261,41 @@ </p> <dl> -<dt><i>api</i></dt> +<dt><i>api</i> (APIsManager.DbAPIs)</dt> <dd> -reference to the API object to be used (APIsManager.DbAPIs) +reference to the API object to be used </dd> -<dt><i>word</i></dt> +<dt><i>word</i> (str)</dt> <dd> -word (or wordpart) to complete (string) +word (or wordpart) to complete </dd> -<dt><i>context</i></dt> +<dt><i>context</i> (bool)</dt> <dd> -flag indicating to autocomplete a context (boolean) +flag indicating to autocomplete a context </dd> -<dt><i>prefix</i></dt> +<dt><i>prefix</i> (str)</dt> <dd> -prefix of the word to be completed (string) +prefix of the word to be completed </dd> -<dt><i>module</i></dt> +<dt><i>module</i> (Module)</dt> <dd> -reference to the scanned module info (Module) +reference to the scanned module info </dd> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the editor object (QScintilla.Editor.Editor) +reference to the editor object </dd> </dl> <dl> <dt>Return:</dt> <dd> -list of possible completions (list of strings) +list of possible completions +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="Assistant.__getCompletions" ID="Assistant.__getCompletions"></a> @@ -296,52 +307,57 @@ </p> <dl> -<dt><i>word</i></dt> +<dt><i>word</i> (str)</dt> <dd> -word (or wordpart) to complete (string) +word (or wordpart) to complete </dd> -<dt><i>context</i></dt> +<dt><i>context</i> (bool)</dt> <dd> -flag indicating to autocomplete a context (boolean) +flag indicating to autocomplete a context </dd> -<dt><i>prefix</i></dt> +<dt><i>prefix</i> (str)</dt> <dd> -prefix of the word to be completed (string) +prefix of the word to be completed </dd> -<dt><i>language</i></dt> +<dt><i>language</i> (str)</dt> <dd> -programming language of the source (string) +programming language of the source </dd> -<dt><i>projectType</i></dt> +<dt><i>projectType</i> (str)</dt> <dd> -type of the project (string) +type of the project </dd> -<dt><i>module</i></dt> +<dt><i>module</i> (Module)</dt> <dd> -reference to the scanned module info (Module) +reference to the scanned module info </dd> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the editor object (QScintilla.Editor.Editor) +reference to the editor object </dd> -<dt><i>importCompletion</i></dt> +<dt><i>importCompletion</i> (bool)</dt> <dd> -flag indicating an import completion (boolean) +flag indicating an import completion </dd> -<dt><i>documentOnly</i></dt> +<dt><i>documentOnly</i> (bool)</dt> <dd> flag indicating to complete from the document only - (boolean) </dd> -<dt><i>sep</i></dt> +<dt><i>sep</i> (str)</dt> <dd> -separator string (string) +separator string </dd> </dl> <dl> <dt>Return:</dt> <dd> -list of possible completions (list of strings) +list of possible completions +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="Assistant.__getDocumentCalltips" ID="Assistant.__getDocumentCalltips"></a> @@ -353,31 +369,37 @@ </p> <dl> -<dt><i>word</i></dt> +<dt><i>word</i> (str)</dt> <dd> -function to get calltips for (string) +function to get calltips for </dd> -<dt><i>prefix</i></dt> +<dt><i>prefix</i> (str)</dt> <dd> -prefix of the word to be completed (string) +prefix of the word to be completed </dd> -<dt><i>module</i></dt> +<dt><i>module</i> (Module)</dt> <dd> -reference to the scanned module info (Module) +reference to the scanned module info </dd> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the editor object (QScintilla.Editor) +reference to the editor object </dd> -<dt><i>doHierarchy=</i></dt> +<dt><i>doHierarchy</i> (bool)</dt> <dd> -flag indicating a hierarchical search (boolean) +flag indicating a hierarchical search </dd> </dl> <dl> <dt>Return:</dt> <dd> -list of calltips (list of string) +list of calltips +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="Assistant.__getDocumentCompletions" ID="Assistant.__getDocumentCompletions"></a> @@ -389,39 +411,45 @@ </p> <dl> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the editor object (QScintilla.Editor.Editor) +reference to the editor object </dd> -<dt><i>word</i></dt> +<dt><i>word</i> (str)</dt> <dd> -string to be completed (string) +string to be completed </dd> -<dt><i>context</i></dt> +<dt><i>context</i> (bool)</dt> <dd> -flag indicating to autocomplete a context (boolean) +flag indicating to autocomplete a context </dd> -<dt><i>sep</i></dt> +<dt><i>sep</i> (str)</dt> <dd> -separator string (string) +separator string </dd> -<dt><i>prefix</i></dt> +<dt><i>prefix</i> (str)</dt> <dd> -prefix of the word to be completed (string) +prefix of the word to be completed </dd> -<dt><i>module</i></dt> +<dt><i>module</i> (Module)</dt> <dd> -reference to the scanned module info (Module) +reference to the scanned module info </dd> -<dt><i>doHierarchy=</i></dt> +<dt><i>doHierarchy</i> (bool)</dt> <dd> -flag indicating a hierarchical search (boolean) +flag indicating a hierarchical search </dd> </dl> <dl> <dt>Return:</dt> <dd> -list of possible completions (list of strings) +list of possible completions +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="Assistant.__getProjectType" ID="Assistant.__getProjectType"></a> @@ -467,13 +495,13 @@ </p> <dl> -<dt><i>userListId</i></dt> +<dt><i>userListId</i> (int)</dt> <dd> -the ID of the user list (should be 1) (integer) +the ID of the user list (should be 1) </dd> -<dt><i>txt</i></dt> +<dt><i>txt</i> (str)</dt> <dd> -the selected text (string) +the selected text </dd> </dl> <a NAME="Assistant.__setAutoCompletionHook" ID="Assistant.__setAutoCompletionHook"></a> @@ -485,9 +513,9 @@ </p> <dl> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the editor (QScintilla.Editor) +reference to the editor </dd> </dl> <a NAME="Assistant.__setCalltipsHook" ID="Assistant.__setCalltipsHook"></a> @@ -499,9 +527,9 @@ </p> <dl> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the editor (QScintilla.Editor) +reference to the editor </dd> </dl> <a NAME="Assistant.__shutdown" ID="Assistant.__shutdown"></a> @@ -520,9 +548,9 @@ </p> <dl> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the editor (QScintilla.Editor) +reference to the editor </dd> </dl> <a NAME="Assistant.__unsetCalltipsHook" ID="Assistant.__unsetCalltipsHook"></a> @@ -534,9 +562,9 @@ </p> <dl> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the editor (QScintilla.Editor) +reference to the editor </dd> </dl> <a NAME="Assistant.activate" ID="Assistant.activate"></a> @@ -555,24 +583,29 @@ </p> <dl> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> -reference to the editor (QScintilla.Editor) +reference to the editor </dd> -<dt><i>pos</i></dt> +<dt><i>pos</i> (int)</dt> <dd> -position in the text for the calltip (integer) +position in the text for the calltip </dd> -<dt><i>commas</i></dt> +<dt><i>commas</i> (int)</dt> <dd> minimum number of commas contained in the calltip - (integer) </dd> </dl> <dl> <dt>Return:</dt> <dd> -list of possible calltips (list of strings) +list of possible calltips +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="Assistant.deactivate" ID="Assistant.deactivate"></a> @@ -591,20 +624,25 @@ </p> <dl> -<dt><i>editor</i></dt> +<dt><i>editor</i> (Editor)</dt> <dd> reference to the editor object, that called this method - (QScintilla.Editor) </dd> -<dt><i>context</i></dt> +<dt><i>context</i> (bool)</dt> <dd> -flag indicating to autocomplete a context (boolean) +flag indicating to autocomplete a context </dd> </dl> <dl> <dt>Return:</dt> <dd> -list of possible completions (list of strings) +list of possible completions +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str </dd> </dl> <a NAME="Assistant.setEnabled" ID="Assistant.setEnabled"></a> @@ -616,13 +654,13 @@ </p> <dl> -<dt><i>key</i></dt> +<dt><i>key</i> (str)</dt> <dd> -feature to set (string) +feature to set </dd> -<dt><i>enabled</i></dt> +<dt><i>enabled</i> (bool)</dt> <dd> -flag indicating the status (boolean) +flag indicating the status </dd> </dl> <div align="right"><a href="#top">Up</a></div>
--- a/AssistantEric/Documentation/source/Plugin_Assistant_Eric.PluginAssistantEric.html Tue May 25 17:22:05 2021 +0200 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.PluginAssistantEric.html Tue May 25 17:48:25 2021 +0200 @@ -110,11 +110,11 @@ </tr> <tr> <td><a href="#AssistantEricPlugin.getPreferences">getPreferences</a></td> -<td>Public method to retrieve the various refactoring settings.</td> +<td>Public method to retrieve the various settings.</td> </tr> <tr> <td><a href="#AssistantEricPlugin.setPreferences">setPreferences</a></td> -<td>Public method to store the various refactoring settings.</td> +<td>Public method to store the various settings.</td> </tr> </table> <h3>Static Methods</h3> @@ -132,9 +132,9 @@ </p> <dl> -<dt><i>ui</i></dt> +<dt><i>ui</i> (UserInterface)</dt> <dd> -reference to the user interface object (UI.UserInterface) +reference to the user interface object </dd> </dl> <a NAME="AssistantEricPlugin.__checkQSql" ID="AssistantEricPlugin.__checkQSql"></a> @@ -147,7 +147,13 @@ <dl> <dt>Return:</dt> <dd> -flag indicating QSql is ok (boolean) +flag indicating QSql is ok +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool </dd> </dl> <a NAME="AssistantEricPlugin.__initialize" ID="AssistantEricPlugin.__initialize"></a> @@ -174,7 +180,13 @@ <dl> <dt>Return:</dt> <dd> -tuple of None and activation status (boolean) +tuple of None and activation status +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool </dd> </dl> <a NAME="AssistantEricPlugin.deactivate" ID="AssistantEricPlugin.deactivate"></a> @@ -189,11 +201,11 @@ <b>getPreferences</b>(<i>key</i>) <p> - Public method to retrieve the various refactoring settings. + Public method to retrieve the various settings. </p> <dl> -<dt><i>key</i></dt> +<dt><i>key</i> (str)</dt> <dd> the key of the value to get </dd> @@ -201,7 +213,13 @@ <dl> <dt>Return:</dt> <dd> -the requested refactoring setting +value of the requested setting +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +Any </dd> </dl> <a NAME="AssistantEricPlugin.setPreferences" ID="AssistantEricPlugin.setPreferences"></a> @@ -209,17 +227,17 @@ <b>setPreferences</b>(<i>key, value</i>) <p> - Public method to store the various refactoring settings. + Public method to store the various settings. </p> <dl> -<dt><i>key</i></dt> +<dt><i>key</i> (str)</dt> <dd> -the key of the setting to be set (string) +the key of the setting to be set </dd> -<dt><i>value</i></dt> +<dt><i>value</i> (Any)</dt> <dd> -the value to be set +value to be set </dd> </dl> <div align="right"><a href="#top">Up</a></div> @@ -234,7 +252,7 @@ </p> <dl> -<dt><i>configDlg</i></dt> +<dt><i>configDlg</i> (ConfigurationWidget)</dt> <dd> reference to the configuration dialog </dd> @@ -245,6 +263,12 @@ reference to the configuration page </dd> </dl> +<dl> +<dt>Return Type:</dt> +<dd> +QWidget +</dd> +</dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> @@ -257,7 +281,7 @@ </p> <dl> -<dt><i>configDlg</i></dt> +<dt><i>configDlg</i> (ConfigurationWidget)</dt> <dd> reference to the configuration dialog </dd> @@ -268,6 +292,12 @@ reference to the configuration page </dd> </dl> +<dl> +<dt>Return Type:</dt> +<dd> +QWidget +</dd> +</dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> @@ -284,6 +314,12 @@ dictionary containing the relevant data </dd> </dl> +<dl> +<dt>Return Type:</dt> +<dd> +dict +</dd> +</dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr />
--- a/AssistantEric/Documentation/source/index-Plugin_Assistant_Eric.html Tue May 25 17:22:05 2021 +0200 +++ b/AssistantEric/Documentation/source/index-Plugin_Assistant_Eric.html Tue May 25 17:48:25 2021 +0200 @@ -22,7 +22,7 @@ <h1>Plugin_Assistant_Eric</h1> <p> -Package implementing the eric6 assistant plugin. +Package implementing the eric7 assistant plugin. </p> <h3>Packages</h3>
--- a/AssistantEric/Documentation/source/index.html Tue May 25 17:22:05 2021 +0200 +++ b/AssistantEric/Documentation/source/index.html Tue May 25 17:48:25 2021 +0200 @@ -27,7 +27,7 @@ <tr> <td><a href="index-Plugin_Assistant_Eric.html">Plugin_Assistant_Eric</a></td> -<td>Package implementing the eric6 assistant plugin.</td> +<td>Package implementing the eric7 assistant plugin.</td> </tr> </table>
--- a/ChangeLog Tue May 25 17:22:05 2021 +0200 +++ b/ChangeLog Tue May 25 17:48:25 2021 +0200 @@ -1,5 +1,10 @@ ChangeLog --------- +Version 1.0.0: +- first release of the eric7 variant + +************************************************************ + Version 5.3.0: - applied some code simplifications - dropped support for some obsolete eric6 versions
--- a/PluginAssistantEric.py Tue May 25 17:22:05 2021 +0200 +++ b/PluginAssistantEric.py Tue May 25 17:48:25 2021 +0200 @@ -9,9 +9,9 @@ import os -from PyQt5.QtCore import QObject, QTranslator, QCoreApplication +from PyQt6.QtCore import QObject, QTranslator, QCoreApplication -from E5Gui.E5Application import e5App +from EricWidgets.EricApplication import ericApp import Preferences @@ -22,7 +22,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "5.3.0" +version = "1.0.0" className = "AssistantEricPlugin" packageName = "AssistantEric" shortDescription = "Alternative autocompletion and calltips provider." @@ -44,40 +44,45 @@ Module function to create the autocompletion configuration page. @param configDlg reference to the configuration dialog + @type ConfigurationWidget @return reference to the configuration page + @rtype QWidget """ global assistantEricPluginObject from AssistantEric.ConfigurationPages.AutoCompletionEricPage import ( AutoCompletionEricPage ) return AutoCompletionEricPage(assistantEricPluginObject) - + def createCallTipsPage(configDlg): """ Module function to create the calltips configuration page. @param configDlg reference to the configuration dialog + @type ConfigurationWidget @return reference to the configuration page + @rtype QWidget """ global assistantEricPluginObject from AssistantEric.ConfigurationPages.CallTipsEricPage import ( CallTipsEricPage ) return CallTipsEricPage(assistantEricPluginObject) - + def getConfigData(): """ Module function returning data as required by the configuration dialog. @return dictionary containing the relevant data + @rtype dict """ try: - usesDarkPalette = e5App().usesDarkPalette() + usesDarkPalette = ericApp().usesDarkPalette() except AttributeError: - from PyQt5.QtGui import QPalette - palette = e5App().palette() + from PyQt6.QtGui import QPalette + palette = ericApp().palette() lightness = palette.color(QPalette.ColorRole.Window).lightness() usesDarkPalette = lightness <= 128 iconSuffix = "dark" if usesDarkPalette else "light" @@ -113,7 +118,8 @@ """ Constructor - @param ui reference to the user interface object (UI.UserInterface) + @param ui reference to the user interface object + @type UserInterface """ QObject.__init__(self, ui) self.__ui = ui @@ -141,14 +147,15 @@ """ Private method to perform some checks on QSql. - @return flag indicating QSql is ok (boolean) + @return flag indicating QSql is ok + @rtype bool """ global error try: - from PyQt5.QtSql import QSqlDatabase + from PyQt6.QtSql import QSqlDatabase except ImportError: - error = self.tr("PyQt5.QtSql is not available.") + error = self.tr("PyQt6.QtSql is not available.") return False drivers = QSqlDatabase.drivers() @@ -162,7 +169,8 @@ """ Public method to activate this plugin. - @return tuple of None and activation status (boolean) + @return tuple of None and activation status + @rtype bool """ global error error = "" # clear previous error @@ -176,7 +184,7 @@ from AssistantEric.Assistant import Assistant self.__object = Assistant(self, self.__ui) - e5App().registerPluginObject("AssistantEric", self.__object) + ericApp().registerPluginObject("AssistantEric", self.__object) self.__object.activate() @@ -186,7 +194,7 @@ """ Public method to deactivate this plugin. """ - e5App().unregisterPluginObject("AssistantEric") + ericApp().unregisterPluginObject("AssistantEric") self.__object.deactivate() @@ -206,7 +214,7 @@ loaded = translator.load(translation, locale_dir) if loaded: self.__translator = translator - e5App().installTranslator(self.__translator) + ericApp().installTranslator(self.__translator) else: print("Warning: translation file '{0}' could not be" " loaded.".format(translation)) @@ -214,10 +222,12 @@ def getPreferences(self, key): """ - Public method to retrieve the various refactoring settings. + Public method to retrieve the various settings. @param key the key of the value to get - @return the requested refactoring setting + @type str + @return value of the requested setting + @rtype Any """ if key in ["AutoCompletionEnabled", "AutoCompletionFollowHierarchy", "CalltipsEnabled", "CallTipsContextShown", @@ -230,10 +240,12 @@ def setPreferences(self, key, value): """ - Public method to store the various refactoring settings. + Public method to store the various settings. - @param key the key of the setting to be set (string) - @param value the value to be set + @param key the key of the setting to be set + @type str + @param value value to be set + @type Any """ Preferences.Prefs.settings.setValue( self.PreferencesKey + "/" + key, value)
--- a/PluginEricAssistant.e4p Tue May 25 17:22:05 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,518 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE Project SYSTEM "Project-5.1.dtd"> -<!-- eric project file for project PluginEricAssistant --> -<!-- Copyright (C) 2020 Detlev Offenbach, detlev@die-offenbachs.de --> -<Project version="5.1"> - <Language>en</Language> - <Hash>3ad6504a180bc4770ebb6d0123dfcca5c4b21f8c</Hash> - <ProgLanguage mixed="0">Python3</ProgLanguage> - <ProjectType>E6Plugin</ProjectType> - <Description>Plugin implementing an alternative autocompletion and calltips provider.</Description> - <Version>4.x</Version> - <Author>Detlev Offenbach</Author> - <Email>detlev@die-offenbachs.de</Email> - <TranslationPattern>AssistantEric/i18n/assistant_%language%.ts</TranslationPattern> - <Eol index="1"/> - <Sources> - <Source>AssistantEric/APIsManager.py</Source> - <Source>AssistantEric/Assistant.py</Source> - <Source>AssistantEric/ConfigurationPages/AutoCompletionEricPage.py</Source> - <Source>AssistantEric/ConfigurationPages/CallTipsEricPage.py</Source> - <Source>AssistantEric/ConfigurationPages/__init__.py</Source> - <Source>AssistantEric/__init__.py</Source> - <Source>PluginAssistantEric.py</Source> - <Source>__init__.py</Source> - </Sources> - <Forms> - <Form>AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui</Form> - <Form>AssistantEric/ConfigurationPages/CallTipsEricPage.ui</Form> - </Forms> - <Translations> - <Translation>AssistantEric/i18n/assistant_cs.ts</Translation> - <Translation>AssistantEric/i18n/assistant_de.qm</Translation> - <Translation>AssistantEric/i18n/assistant_de.ts</Translation> - <Translation>AssistantEric/i18n/assistant_en.qm</Translation> - <Translation>AssistantEric/i18n/assistant_en.ts</Translation> - <Translation>AssistantEric/i18n/assistant_es.qm</Translation> - <Translation>AssistantEric/i18n/assistant_es.ts</Translation> - <Translation>AssistantEric/i18n/assistant_fr.ts</Translation> - <Translation>AssistantEric/i18n/assistant_it.ts</Translation> - <Translation>AssistantEric/i18n/assistant_pt.qm</Translation> - <Translation>AssistantEric/i18n/assistant_pt.ts</Translation> - <Translation>AssistantEric/i18n/assistant_ru.qm</Translation> - <Translation>AssistantEric/i18n/assistant_ru.ts</Translation> - <Translation>AssistantEric/i18n/assistant_zh_CN.GB2312.ts</Translation> - </Translations> - <Others> - <Other>.hgignore</Other> - <Other>AssistantEric/ConfigurationPages/eric-dark.svg</Other> - <Other>AssistantEric/ConfigurationPages/eric-light.svg</Other> - <Other>AssistantEric/Documentation/LICENSE.GPL3</Other> - <Other>AssistantEric/Documentation/source</Other> - <Other>ChangeLog</Other> - <Other>PKGLIST</Other> - <Other>PluginAssistantEric.zip</Other> - <Other>PluginEricAssistant.e4p</Other> - </Others> - <MainScript>PluginAssistantEric.py</MainScript> - <Vcs> - <VcsType>Mercurial</VcsType> - <VcsOptions> - <dict> - <key> - <string>add</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>checkout</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>commit</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>diff</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>export</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>global</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>history</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>log</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>remove</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>status</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>tag</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>update</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - </dict> - </VcsOptions> - </Vcs> - <FiletypeAssociations> - <FiletypeAssociation pattern="*.idl" type="INTERFACES"/> - <FiletypeAssociation pattern="*.py" type="SOURCES"/> - <FiletypeAssociation pattern="*.py3" type="SOURCES"/> - <FiletypeAssociation pattern="*.pyw" type="SOURCES"/> - <FiletypeAssociation pattern="*.pyw3" type="SOURCES"/> - <FiletypeAssociation pattern="*.qm" type="TRANSLATIONS"/> - <FiletypeAssociation pattern="*.qrc" type="RESOURCES"/> - <FiletypeAssociation pattern="*.ts" type="TRANSLATIONS"/> - <FiletypeAssociation pattern="*.ui" type="FORMS"/> - <FiletypeAssociation pattern="*.ui.h" type="FORMS"/> - <FiletypeAssociation pattern="Ui_*.py" type="__IGNORE__"/> - </FiletypeAssociations> - <Documentation> - <DocumentationParams> - <dict> - <key> - <string>ERIC4DOC</string> - </key> - <value> - <dict> - <key> - <string>cssFile</string> - </key> - <value> - <string>%PYTHON%/eric6/CSSs/default.css</string> - </value> - <key> - <string>ignoreDirectories</string> - </key> - <value> - <list> - <string>.ropeproject</string> - <string>.eric6project</string> - </list> - </value> - <key> - <string>ignoreFilePatterns</string> - </key> - <value> - <list> - <string>Ui_*</string> - </list> - </value> - <key> - <string>outputDirectory</string> - </key> - <value> - <string>AssistantEric/Documentation/source</string> - </value> - <key> - <string>qtHelpEnabled</string> - </key> - <value> - <bool>False</bool> - </value> - <key> - <string>useRecursion</string> - </key> - <value> - <bool>True</bool> - </value> - </dict> - </value> - </dict> - </DocumentationParams> - </Documentation> - <Checkers> - <CheckersParams> - <dict> - <key> - <string>Pep8Checker</string> - </key> - <value> - <dict> - <key> - <string>AnnotationsChecker</string> - </key> - <value> - <dict> - <key> - <string>MaximumComplexity</string> - </key> - <value> - <int>3</int> - </value> - <key> - <string>MinimumCoverage</string> - </key> - <value> - <int>75</int> - </value> - </dict> - </value> - <key> - <string>BlankLines</string> - </key> - <value> - <tuple> - <int>2</int> - <int>1</int> - </tuple> - </value> - <key> - <string>BuiltinsChecker</string> - </key> - <value> - <dict> - <key> - <string>bytes</string> - </key> - <value> - <list> - <string>unicode</string> - </list> - </value> - <key> - <string>chr</string> - </key> - <value> - <list> - <string>unichr</string> - </list> - </value> - <key> - <string>str</string> - </key> - <value> - <list> - <string>unicode</string> - </list> - </value> - </dict> - </value> - <key> - <string>CommentedCodeChecker</string> - </key> - <value> - <dict> - <key> - <string>Aggressive</string> - </key> - <value> - <bool>False</bool> - </value> - </dict> - </value> - <key> - <string>CopyrightAuthor</string> - </key> - <value> - <string></string> - </value> - <key> - <string>CopyrightMinFileSize</string> - </key> - <value> - <int>0</int> - </value> - <key> - <string>DocstringType</string> - </key> - <value> - <string>eric</string> - </value> - <key> - <string>EnabledCheckerCategories</string> - </key> - <value> - <string>C, D, E, M, N, S, W</string> - </value> - <key> - <string>ExcludeFiles</string> - </key> - <value> - <string>*/Ui_*.py, */*_rc.py,</string> - </value> - <key> - <string>ExcludeMessages</string> - </key> - <value> - <string>C101,E265,E266,E305,E402,M811,N802,N803,N807,N808,N821,W293,M201,W504</string> - </value> - <key> - <string>FixCodes</string> - </key> - <value> - <string></string> - </value> - <key> - <string>FixIssues</string> - </key> - <value> - <bool>False</bool> - </value> - <key> - <string>FutureChecker</string> - </key> - <value> - <string>unicode_literals</string> - </value> - <key> - <string>HangClosing</string> - </key> - <value> - <bool>False</bool> - </value> - <key> - <string>IncludeMessages</string> - </key> - <value> - <string></string> - </value> - <key> - <string>LineComplexity</string> - </key> - <value> - <int>20</int> - </value> - <key> - <string>LineComplexityScore</string> - </key> - <value> - <int>10</int> - </value> - <key> - <string>MaxCodeComplexity</string> - </key> - <value> - <int>10</int> - </value> - <key> - <string>MaxDocLineLength</string> - </key> - <value> - <int>79</int> - </value> - <key> - <string>MaxLineLength</string> - </key> - <value> - <int>79</int> - </value> - <key> - <string>NoFixCodes</string> - </key> - <value> - <string>E501</string> - </value> - <key> - <string>RepeatMessages</string> - </key> - <value> - <bool>True</bool> - </value> - <key> - <string>SecurityChecker</string> - </key> - <value> - <dict> - <key> - <string>CheckTypedException</string> - </key> - <value> - <bool>False</bool> - </value> - <key> - <string>HardcodedTmpDirectories</string> - </key> - <value> - <list> - <string>/tmp</string> - <string>/var/tmp</string> - <string>/dev/shm</string> - <string>~/tmp</string> - </list> - </value> - <key> - <string>InsecureHashes</string> - </key> - <value> - <list> - <string>md4</string> - <string>md5</string> - <string>sha</string> - <string>sha1</string> - </list> - </value> - <key> - <string>InsecureSslProtocolVersions</string> - </key> - <value> - <list> - <string>PROTOCOL_SSLv2</string> - <string>SSLv2_METHOD</string> - <string>SSLv23_METHOD</string> - <string>PROTOCOL_SSLv3</string> - <string>PROTOCOL_TLSv1</string> - <string>SSLv3_METHOD</string> - <string>TLSv1_METHOD</string> - </list> - </value> - <key> - <string>WeakKeySizeDsaHigh</string> - </key> - <value> - <string>1024</string> - </value> - <key> - <string>WeakKeySizeDsaMedium</string> - </key> - <value> - <string>2048</string> - </value> - <key> - <string>WeakKeySizeEcHigh</string> - </key> - <value> - <string>160</string> - </value> - <key> - <string>WeakKeySizeEcMedium</string> - </key> - <value> - <string>224</string> - </value> - <key> - <string>WeakKeySizeRsaHigh</string> - </key> - <value> - <string>1024</string> - </value> - <key> - <string>WeakKeySizeRsaMedium</string> - </key> - <value> - <string>2048</string> - </value> - </dict> - </value> - <key> - <string>ShowIgnored</string> - </key> - <value> - <bool>False</bool> - </value> - <key> - <string>ValidEncodings</string> - </key> - <value> - <string>latin-1, utf-8</string> - </value> - </dict> - </value> - </dict> - </CheckersParams> - </Checkers> -</Project>
--- a/PluginEricAssistant.epj Tue May 25 17:22:05 2021 +0200 +++ b/PluginEricAssistant.epj Tue May 25 17:48:25 2021 +0200 @@ -113,10 +113,11 @@ "DOCSTRING": "", "DOCUMENTATIONPARMS": { "ERIC4DOC": { - "cssFile": "%PYTHON%/eric6/CSSs/default.css", + "cssFile": "%PYTHON%/eric7/CSSs/default.css", "ignoreDirectories": [ ".ropeproject", - ".eric6project" + ".eric6project", + ".eric7project" ], "ignoreFilePatterns": [ "Ui_*" @@ -129,17 +130,25 @@ "EMAIL": "detlev@die-offenbachs.de", "EOL": 1, "FILETYPES": { + "*.e4p": "OTHERS", + "*.epj": "OTHERS", "*.idl": "INTERFACES", + "*.md": "OTHERS", + "*.proto": "PROTOCOLS", "*.py": "SOURCES", "*.py3": "SOURCES", "*.pyw": "SOURCES", "*.pyw3": "SOURCES", "*.qm": "TRANSLATIONS", - "*.qrc": "RESOURCES", + "*.rst": "OTHERS", "*.ts": "TRANSLATIONS", + "*.txt": "OTHERS", "*.ui": "FORMS", - "*.ui.h": "FORMS", - "Ui_*.py": "__IGNORE__" + "GNUmakefile": "OTHERS", + "Makefile": "OTHERS", + "README": "OTHERS", + "README.*": "OTHERS", + "makefile": "OTHERS" }, "FORMS": [ "AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui", @@ -162,7 +171,7 @@ "MakeTarget": "", "MakeTestOnly": true }, - "MIXEDLANGUAGE": 0, + "MIXEDLANGUAGE": false, "OTHERS": [ ".hgignore", "AssistantEric/ConfigurationPages/eric-dark.svg", @@ -172,12 +181,12 @@ "ChangeLog", "PKGLIST", "PluginAssistantEric.zip", - "PluginEricAssistant.e4p" + "PluginEricAssistant.epj" ], "OTHERTOOLSPARMS": {}, "PACKAGERSPARMS": {}, "PROGLANGUAGE": "Python3", - "PROJECTTYPE": "E6Plugin", + "PROJECTTYPE": "E7Plugin", "PROJECTTYPESPECIFICDATA": {}, "PROTOCOLS": [], "RCCPARAMS": { @@ -195,7 +204,9 @@ "AssistantEric/ConfigurationPages/__init__.py", "AssistantEric/__init__.py", "PluginAssistantEric.py", - "__init__.py" + "__init__.py", + "AssistantEric/ConfigurationPages/Ui_AutoCompletionEricPage.py", + "AssistantEric/ConfigurationPages/Ui_CallTipsEricPage.py" ], "SPELLEXCLUDES": "", "SPELLLANGUAGE": "en", @@ -264,6 +275,6 @@ ] }, "VCSOTHERDATA": {}, - "VERSION": "4.x" + "VERSION": "" } } \ No newline at end of file