Wed, 30 Aug 2023 11:58:51 +0200
Corrected some code style and formatting issues and prepared the code for Python 3.12.
--- a/ChangeLog Sat Dec 31 16:27:52 2022 +0100 +++ b/ChangeLog Wed Aug 30 11:58:51 2023 +0200 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 10.2.1: +- bug fixes + Version 10.2.0: - adapted to the project browser changes as of eric 22.12
--- a/PluginProjectWeb.py Sat Dec 31 16:27:52 2022 +0100 +++ b/PluginProjectWeb.py Wed Aug 30 11:58:51 2023 +0200 @@ -29,7 +29,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "10.2.0" +version = "10.2.1" className = "ProjectWebPlugin" packageName = "ProjectWeb" shortDescription = "Support for Web projects and web related tools." @@ -92,7 +92,7 @@ try: # backward compatibility for eric7 < 22.12 - from eric7.Project.ProjectBrowser import ( + from eric7.Project.ProjectBrowser import ( # noqa: I101 FormsBrowserFlag, OthersBrowserFlag, SourcesBrowserFlag,
--- a/PluginWeb.epj Sat Dec 31 16:27:52 2022 +0100 +++ b/PluginWeb.epj Wed Aug 30 11:58:51 2023 +0200 @@ -1,7 +1,7 @@ { "header": { "comment": "eric project file for project PluginWeb", - "copyright": "Copyright (C) 2022 Detlev Offenbach, detlev@die-offenbachs.de" + "copyright": "Copyright (C) 2023 Detlev Offenbach, detlev@die-offenbachs.de" }, "project": { "AUTHOR": "Detlev Offenbach", @@ -11,10 +11,14 @@ "AllowStarArgAny": false, "AllowUntypedDefs": false, "AllowUntypedNested": false, + "CheckFutureAnnotations": false, "DispatchDecorators": [ "singledispatch", "singledispatchmethod" ], + "ExemptedTypingSymbols": [ + "" + ], "ForceFutureAnnotations": false, "MaximumComplexity": 3, "MaximumLength": 7, @@ -62,15 +66,18 @@ "CopyrightAuthor": "", "CopyrightMinFileSize": 0, "DocstringType": "eric_black", - "EnabledCheckerCategories": "C, D, E, M, N, S, Y, W", + "EnabledCheckerCategories": "C, D, E, I, M, NO, N, S, Y, U, 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,W503,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,U200,W293,W503,Y119,Y401,Y402", "FixCodes": "", "FixIssues": false, "FutureChecker": "", "HangClosing": false, "ImportsChecker": { - "ApplicationPackageNames": [], + "ApplicationPackageNames": [ + "ProjectWeb", + "eric7" + ], "BanRelativeImports": "", "BannedModules": [] }, @@ -80,6 +87,17 @@ "MaxCodeComplexity": 10, "MaxDocLineLength": 88, "MaxLineLength": 88, + "NameOrderChecker": { + "ApplicationPackageNames": [ + "ProjectWeb", + "eric7" + ], + "CombinedAsImports": false, + "SortCaseSensitive": false, + "SortFromFirst": false, + "SortIgnoringStyle": false, + "SortOrder": "natural" + }, "NoFixCodes": "E501", "RepeatMessages": true, "SecurityChecker": { @@ -113,6 +131,19 @@ "WeakKeySizeRsaMedium": "2048" }, "ShowIgnored": false, + "UnusedChecker": { + "IgnoreAbstract": true, + "IgnoreDunderGlobals": true, + "IgnoreDunderMethods": true, + "IgnoreEventHandlerMethods": true, + "IgnoreLambdas": false, + "IgnoreNestedFunctions": false, + "IgnoreOverload": true, + "IgnoreOverride": true, + "IgnoreSlotMethods": true, + "IgnoreStubs": true, + "IgnoreVariadicNames": false + }, "ValidEncodings": "latin-1, utf-8" } }, @@ -132,6 +163,7 @@ ], "outputDirectory": "ProjectWeb/Documentation/source", "qtHelpEnabled": false, + "startDirectory": "", "useRecursion": true } }, @@ -195,7 +227,7 @@ ], "OTHERTOOLSPARMS": { "Black": { - "exclude": "/(\\.direnv|\\.eggs|\\.git|\\.hg|\\.mypy_cache|\\.nox|\\.tox|\\.venv|venv|\\.svn|\\.ipynb_checkpoints|_build|buck-out|build|dist|__pypackages__)/", + "exclude": "/(\\.direnv|\\.eggs|\\.git|\\.hg|\\.ipynb_checkpoints|\\.mypy_cache|\\.nox|\\.pytest_cache|\\.ruff_cache|\\.tox|\\.svn|\\.venv|\\.vscode|__pypackages__|_build|buck-out|build|dist|venv)/", "extend-exclude": "", "force-exclude": "", "line-length": 88, @@ -203,11 +235,11 @@ "skip-string-normalization": false, "source": "project", "target-version": [ + "py312", "py311", "py310", "py39", - "py38", - "py37" + "py38" ] }, "isort": { @@ -250,6 +282,7 @@ "ProjectWeb/__init__.py", "__init__.py" ], + "SOURCESDIR": "", "SPELLEXCLUDES": "", "SPELLLANGUAGE": "en_US", "SPELLWORDS": "",
--- a/ProjectWeb/Html5Prettifier.py Sat Dec 31 16:27:52 2022 +0100 +++ b/ProjectWeb/Html5Prettifier.py Wed Aug 30 11:58:51 2023 +0200 @@ -9,6 +9,7 @@ import re +from bs4 import BeautifulSoup from PyQt6.QtCore import QObject from eric7 import Preferences @@ -40,8 +41,6 @@ @return prettified HTML code @rtype str """ - from bs4 import BeautifulSoup - soup = BeautifulSoup(self.__html, "html.parser") prettyHtml = soup.prettify(formatter=self.tagPrettify) # prettify comments @@ -80,7 +79,7 @@ @return prettified comment @rtype str """ - if re.search("\n", matchobj.group()): + if re.search(r"\n", matchobj.group()): return self.tagPrettify(matchobj.group()) else: return matchobj.group()
--- a/ProjectWeb/Html5ToCss3Converter.py Sat Dec 31 16:27:52 2022 +0100 +++ b/ProjectWeb/Html5ToCss3Converter.py Wed Aug 30 11:58:51 2023 +0200 @@ -12,6 +12,7 @@ import os import random +from bs4 import BeautifulSoup from PyQt6.QtCore import QObject from PyQt6.QtWidgets import QDialog @@ -158,8 +159,6 @@ """ Private method to get a BeaitifulSoup object with our HTML text. """ - from bs4 import BeautifulSoup - self.__soup = BeautifulSoup(BeautifulSoup(self.__html).prettify()) def __getTags(self):
--- a/ProjectWeb/Html5ToJsConverter.py Sat Dec 31 16:27:52 2022 +0100 +++ b/ProjectWeb/Html5ToJsConverter.py Wed Aug 30 11:58:51 2023 +0200 @@ -12,6 +12,7 @@ import os import re +from bs4 import BeautifulSoup from PyQt6.QtCore import QObject from PyQt6.QtWidgets import QDialog @@ -143,8 +144,6 @@ """ Private method to get a BeaitifulSoup object with our HTML text. """ - from bs4 import BeautifulSoup - self.__soup = BeautifulSoup(BeautifulSoup(self.__html).prettify()) def __getClasses(self):