Corrected some code style issues and converted some source code documentation to the new style. eric7

Sat, 23 Dec 2023 16:19:01 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 23 Dec 2023 16:19:01 +0100
branch
eric7
changeset 146
32c4e3d4465c
parent 145
c423d46df27e
child 147
908186813616

Corrected some code style issues and converted some source code documentation to the new style.

CxFreeze/CxfreezeExecDialog.py file | annotate | diff | comparison | revisions
CxFreeze/Documentation/source/Plugin_Packager_CxFreeze.CxFreeze.CxfreezeExecDialog.html file | annotate | diff | comparison | revisions
PluginCxFreeze.epj file | annotate | diff | comparison | revisions
PluginCxFreeze.py file | annotate | diff | comparison | revisions
--- a/CxFreeze/CxfreezeExecDialog.py	Sat Dec 23 15:48:49 2023 +0100
+++ b/CxFreeze/CxfreezeExecDialog.py	Sat Dec 23 16:19:01 2023 +0100
@@ -33,8 +33,10 @@
         """
         Constructor
 
-        @param cmdname name of the packager (string)
-        @param parent parent widget of this dialog (QWidget)
+        @param cmdname name of the packager
+        @type str
+        @param parent parent widget of this dialog
+        @type QWidget
         """
         super().__init__(parent)
         self.setupUi(self)
@@ -218,6 +220,7 @@
         Constructor
 
         @param main self-object of the caller
+        @type CxfreezeExecDialog
         """
         super().__init__()
 
--- a/CxFreeze/Documentation/source/Plugin_Packager_CxFreeze.CxFreeze.CxfreezeExecDialog.html	Sat Dec 23 15:48:49 2023 +0100
+++ b/CxFreeze/Documentation/source/Plugin_Packager_CxFreeze.CxFreeze.CxfreezeExecDialog.html	Sat Dec 23 16:19:01 2023 +0100
@@ -99,7 +99,7 @@
 </p>
 <dl>
 
-<dt><i>main</i></dt>
+<dt><i>main</i> (CxfreezeExecDialog)</dt>
 <dd>
 self-object of the caller
 </dd>
@@ -262,13 +262,13 @@
 </p>
 <dl>
 
-<dt><i>cmdname</i></dt>
+<dt><i>cmdname</i> (str)</dt>
 <dd>
-name of the packager (string)
+name of the packager
 </dd>
-<dt><i>parent</i></dt>
+<dt><i>parent</i> (QWidget)</dt>
 <dd>
-parent widget of this dialog (QWidget)
+parent widget of this dialog
 </dd>
 </dl>
 <a NAME="CxfreezeExecDialog.__enableButtons" ID="CxfreezeExecDialog.__enableButtons"></a>
--- a/PluginCxFreeze.epj	Sat Dec 23 15:48:49 2023 +0100
+++ b/PluginCxFreeze.epj	Sat Dec 23 16:19:01 2023 +0100
@@ -1,7 +1,7 @@
 {
   "header": {
     "comment": "eric project file for project PluginCxFreeze",
-    "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, 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,M852,N802,N803,N807,N808,N821,W293,W503,Y119,Y401,Y402",
         "FixCodes": "",
         "FixIssues": false,
         "FutureChecker": "",
         "HangClosing": false,
         "ImportsChecker": {
-          "ApplicationPackageNames": [],
+          "ApplicationPackageNames": [
+            "CxFreeze",
+            "eric7"
+          ],
           "BanRelativeImports": "",
           "BannedModules": []
         },
@@ -80,6 +87,17 @@
         "MaxCodeComplexity": 10,
         "MaxDocLineLength": 88,
         "MaxLineLength": 88,
+        "NameOrderChecker": {
+          "ApplicationPackageNames": [
+            "CxFreeze",
+            "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"
       }
     },
@@ -132,6 +163,7 @@
         ],
         "outputDirectory": "CxFreeze/Documentation/source",
         "qtHelpEnabled": false,
+        "startDirectory": "",
         "useRecursion": true
       }
     },
@@ -247,6 +279,7 @@
       "PluginCxFreeze.py",
       "__init__.py"
     ],
+    "SOURCESDIR": "",
     "SPELLEXCLUDES": "",
     "SPELLLANGUAGE": "en",
     "SPELLWORDS": "",
--- a/PluginCxFreeze.py	Sat Dec 23 15:48:49 2023 +0100
+++ b/PluginCxFreeze.py	Sat Dec 23 16:19:01 2023 +0100
@@ -97,7 +97,7 @@
         # Windows
         #
         try:
-            import winreg
+            import winreg  # noqa: I101, I103
         except ImportError:
             import _winreg as winreg  # __IGNORE_WARNING__
 
@@ -329,7 +329,7 @@
 
         self.__initialize()
 
-    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.
@@ -369,6 +369,9 @@
         """
         Private slot to handle the cxfreeze execution.
         """
+        from CxFreeze.CxfreezeConfigDialog import CxfreezeConfigDialog
+        from CxFreeze.CxfreezeExecDialog import CxfreezeExecDialog
+
         project = ericApp().getObject("Project")
         if not project.getMainScript():
             # no main script defined
@@ -397,8 +400,6 @@
         if not project.checkAllScriptsDirty(reportSyntaxErrors=True):
             return
 
-        from CxFreeze.CxfreezeConfigDialog import CxfreezeConfigDialog
-
         parms = project.getData("PACKAGERSPARMS", "CXFREEZE")
         dlg = CxfreezeConfigDialog(project, exe, parms)
         if dlg.exec() == QDialog.DialogCode.Accepted:
@@ -406,8 +407,6 @@
             project.setData("PACKAGERSPARMS", "CXFREEZE", parms)
 
             # now do the call
-            from CxFreeze.CxfreezeExecDialog import CxfreezeExecDialog
-
             dia = CxfreezeExecDialog("cxfreeze")
             dia.show()
             res = dia.start(args, parms, project.ppath, project.getMainScript())
@@ -429,4 +428,4 @@
 
 
 #
-# eflag: noqa = M801
+# eflag: noqa = M801, U200

eric ide

mercurial