Wed, 21 Sep 2022 16:49:59 +0200
Reformatted source code with 'Black'.
PluginDocumentationSets.epj | file | annotate | diff | comparison | revisions | |
PluginDocumentationSets.py | file | annotate | diff | comparison | revisions |
--- a/PluginDocumentationSets.epj Wed Apr 13 11:56:03 2022 +0200 +++ b/PluginDocumentationSets.epj Wed Sep 21 16:49:59 2022 +0200 @@ -8,12 +8,14 @@ "CHECKERSPARMS": { "Pep8Checker": { "AnnotationsChecker": { + "AllowStarArgAny": false, "AllowUntypedDefs": false, "AllowUntypedNested": false, "DispatchDecorators": [ "singledispatch", "singledispatchmethod" ], + "ForceFutureAnnotations": false, "MaximumComplexity": 3, "MaximumLength": 7, "MinimumCoverage": 75, @@ -59,20 +61,25 @@ }, "CopyrightAuthor": "", "CopyrightMinFileSize": 0, - "DocstringType": "eric", + "DocstringType": "eric_black", "EnabledCheckerCategories": "C, D, E, M, N, Y, W", "ExcludeFiles": "*/Ui_*.py, */*_rc.py,", - "ExcludeMessages": "C101,E265,E266,E305,E402,M201,M301,M302,M303,M304,M305,M306,M307,M308,M311,M312,M313,M314,M315,M321,M701,M702,M811,M834,N802,N803,N807,N808,N821,W293,W504,Y119,Y401,Y402", + "ExcludeMessages": "C101,E265,E266,E305,E402,M201,M301,M302,M303,M304,M305,M306,M307,M308,M311,M312,M313,M314,M315,M321,M701,M702,M811,M834,N802,N803,N807,N808,N821,W293,W503,Y119,Y401,Y402", "FixCodes": "", "FixIssues": false, "FutureChecker": "", "HangClosing": false, + "ImportsChecker": { + "ApplicationPackageNames": [], + "BanRelativeImports": "", + "BannedModules": [] + }, "IncludeMessages": "", "LineComplexity": 25, "LineComplexityScore": 10, "MaxCodeComplexity": 10, - "MaxDocLineLength": 79, - "MaxLineLength": 79, + "MaxDocLineLength": 88, + "MaxLineLength": 88, "NoFixCodes": "E501", "RepeatMessages": true, "SecurityChecker": { @@ -128,6 +135,7 @@ } }, "EMAIL": "detlev@die-offenbachs.de", + "EMBEDDED_VENV": false, "EOL": 1, "FILETYPES": { "*.epj": "OTHERS", @@ -159,6 +167,7 @@ }, "INTERFACES": [], "LEXERASSOCS": {}, + "LICENSE": "GNU General Public License v3 or later (GPLv3+)", "MAINSCRIPT": "PluginDocumentationSets.py", "MAKEPARAMS": { "MakeEnabled": false, @@ -173,6 +182,10 @@ ".hgignore", "Documentation/LICENSE.GPL3", "Documentation/source", + "DocumentationSets/PyQt-5.15/PyQt-515.qch", + "DocumentationSets/PyQt-6.2/PyQt-62.qch", + "DocumentationSets/PyQt-6.3/PyQt-63.qch", + "DocumentationSets/Python-3.10/Python-3100.qch", "DocumentationSets/Python-3.6/Python-360.qch", "DocumentationSets/Python-3.7/Python-370.qch", "DocumentationSets/Python-3.8/Python-381.qch", @@ -308,23 +321,6 @@ "DocumentationSets/Qt-5.15/qtx11extras.qch", "DocumentationSets/Qt-5.15/qtxml.qch", "DocumentationSets/Qt-5.15/qtxmlpatterns.qch", - "PKGLIST", - "PKGLIST_Python36", - "PKGLIST_Python37", - "PKGLIST_Python38", - "PKGLIST_Python39", - "PKGLIST_Qt512", - "PKGLIST_Qt515", - "PluginDocumentationSets_Python36.zip", - "PluginDocumentationSets_Python37.zip", - "PluginDocumentationSets_Python38.zip", - "PluginDocumentationSets_Python39.zip", - "PluginDocumentationSets_Qt512.zip", - "PluginDocumentationSets_Qt515.zip", - "PluginDocumentationSets.epj", - "PKGLIST_PyQt515", - "PluginDocumentationSets_PyQt515.zip", - "DocumentationSets/PyQt-5.15/PyQt-515.qch", "DocumentationSets/Qt-6.2/LICENSE.FDL", "DocumentationSets/Qt-6.2/qdoc.qch", "DocumentationSets/Qt-6.2/qmake.qch", @@ -376,14 +372,6 @@ "DocumentationSets/Qt-6.2/qtwebsockets.qch", "DocumentationSets/Qt-6.2/qtwidgets.qch", "DocumentationSets/Qt-6.2/qtxml.qch", - "PKGLIST_Qt62", - "PluginDocumentationSets_Qt62.zip", - "DocumentationSets/PyQt-6.2/PyQt-62.qch", - "DocumentationSets/Python-3.10/Python-3100.qch", - "PKGLIST_PyQt62", - "PKGLIST_Python310", - "PluginDocumentationSets_PyQt62.zip", - "PluginDocumentationSets_Python310.zip", "DocumentationSets/Qt-6.3/LICENSE.FDL", "DocumentationSets/Qt-6.3/qdoc.qch", "DocumentationSets/Qt-6.3/qmake.qch", @@ -437,13 +425,51 @@ "DocumentationSets/Qt-6.3/qtwebview.qch", "DocumentationSets/Qt-6.3/qtwidgets.qch", "DocumentationSets/Qt-6.3/qtxml.qch", - "PKGLIST_Qt63", - "PluginDocumentationSets_Qt63.zip", - "DocumentationSets/PyQt-6.3/PyQt-63.qch", + "PKGLIST", + "PKGLIST_PyQt515", + "PKGLIST_PyQt62", "PKGLIST_PyQt63", - "PluginDocumentationSets_PyQt63.zip" + "PKGLIST_Python310", + "PKGLIST_Python36", + "PKGLIST_Python37", + "PKGLIST_Python38", + "PKGLIST_Python39", + "PKGLIST_Qt512", + "PKGLIST_Qt515", + "PKGLIST_Qt62", + "PKGLIST_Qt63", + "PluginDocumentationSets.epj", + "PluginDocumentationSets_PyQt515.zip", + "PluginDocumentationSets_PyQt62.zip", + "PluginDocumentationSets_PyQt63.zip", + "PluginDocumentationSets_Python310.zip", + "PluginDocumentationSets_Python36.zip", + "PluginDocumentationSets_Python37.zip", + "PluginDocumentationSets_Python38.zip", + "PluginDocumentationSets_Python39.zip", + "PluginDocumentationSets_Qt512.zip", + "PluginDocumentationSets_Qt515.zip", + "PluginDocumentationSets_Qt62.zip", + "PluginDocumentationSets_Qt63.zip" ], - "OTHERTOOLSPARMS": {}, + "OTHERTOOLSPARMS": { + "Black": { + "exclude": "/(\\.direnv|\\.eggs|\\.git|\\.hg|\\.mypy_cache|\\.nox|\\.tox|\\.venv|venv|\\.svn|_build|buck-out|build|dist|__pypackages__)/", + "extend-exclude": "", + "force-exclude": "", + "line-length": 88, + "skip-magic-trailing-comma": false, + "skip-string-normalization": false, + "source": "project", + "target-version": [ + "py311", + "py310", + "py39", + "py38", + "py37" + ] + } + }, "PACKAGERSPARMS": {}, "PROGLANGUAGE": "Python3", "PROJECTTYPE": "E7Plugin", @@ -463,6 +489,7 @@ "SPELLEXCLUDES": "", "SPELLLANGUAGE": "en_US", "SPELLWORDS": "", + "TESTING_FRAMEWORK": "", "TRANSLATIONEXCEPTIONS": [], "TRANSLATIONPATTERN": "", "TRANSLATIONS": [],
--- a/PluginDocumentationSets.py Wed Apr 13 11:56:03 2022 +0200 +++ b/PluginDocumentationSets.py Wed Sep 21 16:49:59 2022 +0200 @@ -36,23 +36,24 @@ def helpFiles(): """ Module function to return the documentation sets provided by this plug-in. - + @return dictionary with documentation set type as key and list of documentation files as values @rtype dict (key: str, value: list of str) """ documentationSets = {} - documentationSetsDir = os.path.join(os.path.dirname(__file__), - "DocumentationSets") + documentationSetsDir = os.path.join(os.path.dirname(__file__), "DocumentationSets") if os.path.isdir(documentationSetsDir): documentationTypes = [ - d for d in os.listdir(documentationSetsDir) + d + for d in os.listdir(documentationSetsDir) if os.path.isdir(os.path.join(documentationSetsDir, d)) ] for documentationType in documentationTypes: documentationSets[documentationType] = glob.glob( - os.path.join(documentationSetsDir, documentationType, "*.qch")) - + os.path.join(documentationSetsDir, documentationType, "*.qch") + ) + return documentationSets @@ -60,26 +61,27 @@ """ Class implementing the QtHelp documentation provider plug-in. """ + def __init__(self, ui): """ Constructor - + @param ui reference to the user interface object (UI.UserInterface) """ super().__init__(ui) self.__ui = ui - + def activate(self): """ Public method to activate this plugin. - + @return tuple of None and activation status (boolean) """ global error - error = "" # clear previous error - + error = "" # clear previous error + return None, True - + def deactivate(self): """ Public method to deactivate this plugin.