Sat, 23 Dec 2023 16:06:01 +0100
Corrected some code style issues.
--- a/PluginPyLint.epj Sat Dec 23 15:48:44 2023 +0100 +++ b/PluginPyLint.epj Sat Dec 23 16:06:01 2023 +0100 @@ -1,7 +1,7 @@ { "header": { "comment": "eric project file for project PluginPyLint", - "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, L, M, NO, N, 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,M852,N802,N803,N807,N808,N821,W293,W503,Y119,Y401,Y402", "FixCodes": "", "FixIssues": false, "FutureChecker": "", "HangClosing": false, "ImportsChecker": { - "ApplicationPackageNames": [], + "ApplicationPackageNames": [ + "PyLintInterface", + "eric7" + ], "BanRelativeImports": "", "BannedModules": [] }, @@ -80,6 +87,17 @@ "MaxCodeComplexity": 10, "MaxDocLineLength": 88, "MaxLineLength": 88, + "NameOrderChecker": { + "ApplicationPackageNames": [ + "PyLintInterface", + "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": false, + "IgnoreLambdas": false, + "IgnoreNestedFunctions": false, + "IgnoreOverload": true, + "IgnoreOverride": true, + "IgnoreSlotMethods": false, + "IgnoreStubs": true, + "IgnoreVariadicNames": false + }, "ValidEncodings": "latin-1, utf-8" } }, @@ -245,6 +276,7 @@ "PyLintInterface/__init__.py", "__init__.py" ], + "SOURCESDIR": "", "SPELLEXCLUDES": "", "SPELLLANGUAGE": "en_US", "SPELLWORDS": "",
--- a/PluginPyLint.py Sat Dec 23 15:48:44 2023 +0100 +++ b/PluginPyLint.py Sat Dec 23 16:06:01 2023 +0100 @@ -126,7 +126,7 @@ # Windows # try: - import winreg + import winreg # noqa: I101, I103 except ImportError: import _winreg as winreg # __IGNORE_WARNING__ @@ -465,7 +465,7 @@ ) print("Using default.") - def __projectShowMenu(self, menuName, menu): + def __projectShowMenu(self, menuName, menu): # noqa: U100 """ Private slot called, when the the project menu or a submenu is about to be shown. @@ -560,6 +560,9 @@ @param forEditor flag indicating a run for an editor @type bool """ + from PyLintInterface.PyLintConfigDialog import PyLintConfigDialog + from PyLintInterface.PyLintExecDialog import PyLintExecDialog + if forEditor: parms = copy.deepcopy(self.__editorParms) editor = ericApp().getObject("ViewManager").getOpenEditor(mpName) @@ -576,8 +579,6 @@ ) return - from PyLintInterface.PyLintConfigDialog import PyLintConfigDialog - dlg = PyLintConfigDialog(project.getProjectPath(), exe, parms, version) if dlg.exec() == QDialog.DialogCode.Accepted: args, parms = dlg.generateParameters() @@ -586,10 +587,8 @@ project.setData("CHECKERSPARMS", "PYLINT", parms) # now do the call - from PyLintInterface.PyLintExecDialog import PyLintExecDialog - dlg2 = PyLintExecDialog() - reportFile = parms.get("reportFile", None) + reportFile = parms.get("reportFile") res = dlg2.start(args, mpName, reportFile, project.getProjectPath()) if res: dlg2.show() @@ -705,4 +704,4 @@ # -# eflag: noqa = M801 +# eflag: noqa = M801, U200
--- a/PyLintInterface/PyLintConfigDialog.py Sat Dec 23 15:48:44 2023 +0100 +++ b/PyLintInterface/PyLintConfigDialog.py Sat Dec 23 16:06:01 2023 +0100 @@ -59,7 +59,7 @@ self.configfilePicker.setWindowTitle(self.tr("Select configuration file")) self.configfilePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) self.configfilePicker.setFilters( - self.tr("Configuration Files (*.cfg *.cnf *.rc);;" "All Files (*)") + self.tr("Configuration Files (*.cfg *.cnf *.rc);;All Files (*)") ) self.configfilePicker.setDefaultDirectory(ppath) @@ -306,7 +306,7 @@ self, self.tr("Process Generation Error"), self.tr( - "Could not start {0}.<br>" "Ensure that it is in the search path." + "Could not start {0}.<br>Ensure that it is in the search path." ).format(self.__lint), )
--- a/PyLintInterface/PyLintExecDialog.py Sat Dec 23 15:48:44 2023 +0100 +++ b/PyLintInterface/PyLintExecDialog.py Sat Dec 23 16:06:01 2023 +0100 @@ -343,7 +343,7 @@ self.errors.insertPlainText(s) self.errors.ensureCursorVisible() - def on_messageList_itemActivated(self, itm, column): + def on_messageList_itemActivated(self, itm, column): # noqa: U100 """ Private slot to handle the itemActivated signal of the message list.