PluginPyLint.py

branch
eric7
changeset 116
71d3a2e48265
parent 115
4a96d169c373
child 117
f8955e5dba87
diff -r 4a96d169c373 -r 71d3a2e48265 PluginPyLint.py
--- 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

eric ide

mercurial