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

Sat, 23 Dec 2023 18:04:29 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 23 Dec 2023 18:04:29 +0100
branch
eric7
changeset 63
4f8151cc9b84
parent 62
970b0bcbd88c
child 64
22103a23447a

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

ColorString.epj file | annotate | diff | comparison | revisions
ColorString/ColorSelectionDialog.py file | annotate | diff | comparison | revisions
ColorString/Documentation/source/Plugin_Tools_ColorString.ColorString.ColorSelectionDialog.html file | annotate | diff | comparison | revisions
PluginColorString.py file | annotate | diff | comparison | revisions
--- a/ColorString.epj	Sat Dec 23 15:48:56 2023 +0100
+++ b/ColorString.epj	Sat Dec 23 18:04:29 2023 +0100
@@ -1,7 +1,7 @@
 {
   "header": {
     "comment": "eric project file for project ColorString",
-    "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": [
+            "ColorString",
+            "eric7"
+          ],
           "BanRelativeImports": "",
           "BannedModules": []
         },
@@ -80,6 +87,17 @@
         "MaxCodeComplexity": 10,
         "MaxDocLineLength": 88,
         "MaxLineLength": 88,
+        "NameOrderChecker": {
+          "ApplicationPackageNames": [
+            "ColorString",
+            "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"
       }
     },
@@ -133,6 +164,7 @@
         "noempty": true,
         "outputDirectory": "ColorString/Documentation/source",
         "qtHelpEnabled": false,
+        "startDirectory": "",
         "useRecursion": true
       }
     },
@@ -245,6 +277,7 @@
       "PluginColorString.py",
       "__init__.py"
     ],
+    "SOURCESDIR": "",
     "SPELLEXCLUDES": "",
     "SPELLLANGUAGE": "en_US",
     "SPELLWORDS": "",
--- a/ColorString/ColorSelectionDialog.py	Sat Dec 23 15:48:56 2023 +0100
+++ b/ColorString/ColorSelectionDialog.py	Sat Dec 23 18:04:29 2023 +0100
@@ -46,6 +46,7 @@
         """
         Public method to retrieve the selected color name.
 
-        @return color name (string)
+        @return color name
+        @rtype str
         """
         return self.colorComboBox.currentText()
--- a/ColorString/Documentation/source/Plugin_Tools_ColorString.ColorString.ColorSelectionDialog.html	Sat Dec 23 15:48:56 2023 +0100
+++ b/ColorString/Documentation/source/Plugin_Tools_ColorString.ColorString.ColorSelectionDialog.html	Sat Dec 23 18:04:29 2023 +0100
@@ -97,7 +97,13 @@
 <dl>
 <dt>Return:</dt>
 <dd>
-color name (string)
+color name
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
--- a/PluginColorString.py	Sat Dec 23 15:48:56 2023 +0100
+++ b/PluginColorString.py	Sat Dec 23 18:04:29 2023 +0100
@@ -308,6 +308,8 @@
         """
         Private slot implementing the named color string selection.
         """
+        from ColorString.ColorSelectionDialog import ColorSelectionDialog
+
         editor = ericApp().getObject("ViewManager").activeWindow()
         if editor is None:
             return
@@ -327,8 +329,6 @@
         else:
             currColor = ""
 
-        from ColorString.ColorSelectionDialog import ColorSelectionDialog
-
         dlg = ColorSelectionDialog(currColor, self.__ui)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             colorStr = dlg.getColor()
@@ -418,4 +418,4 @@
 
 
 #
-# eflag: noqa = M801
+# eflag: noqa = M801, U200

eric ide

mercurial