Reformatted source code with 'Black'. eric7

Wed, 21 Sep 2022 17:01:33 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 21 Sep 2022 17:01:33 +0200
branch
eric7
changeset 52
c8ea815f673d
parent 51
9433e3c136f6
child 53
f69d7f9ab8e4

Reformatted source code with 'Black'.

PluginApis.epj file | annotate | diff | comparison | revisions
PluginApis.py file | annotate | diff | comparison | revisions
--- a/PluginApis.epj	Mon Jun 20 09:19:16 2022 +0200
+++ b/PluginApis.epj	Wed Sep 21 17:01:33 2022 +0200
@@ -8,12 +8,14 @@
     "CHECKERSPARMS": {
       "Pep8Checker": {
         "AnnotationsChecker": {
+          "AllowStarArgAny": false,
           "AllowUntypedDefs": false,
           "AllowUntypedNested": false,
           "DispatchDecorators": [
             "singledispatch",
             "singledispatchmethod"
           ],
+          "ForceFutureAnnotations": false,
           "MaximumComplexity": 3,
           "MaximumLength": 7,
           "MinimumCoverage": 75,
@@ -59,20 +61,25 @@
         },
         "CopyrightAuthor": "",
         "CopyrightMinFileSize": 0,
-        "DocstringType": "eric",
+        "DocstringType": "eric_black",
         "EnabledCheckerCategories": "C, D, E, M, N, S, Y, 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,W504,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,W293,W503,Y119,Y401,Y402",
         "FixCodes": "",
         "FixIssues": false,
         "FutureChecker": "",
         "HangClosing": false,
+        "ImportsChecker": {
+          "ApplicationPackageNames": [],
+          "BanRelativeImports": "",
+          "BannedModules": []
+        },
         "IncludeMessages": "",
         "LineComplexity": 25,
         "LineComplexityScore": 10,
         "MaxCodeComplexity": 10,
-        "MaxDocLineLength": 79,
-        "MaxLineLength": 79,
+        "MaxDocLineLength": 88,
+        "MaxLineLength": 88,
         "NoFixCodes": "E501",
         "RepeatMessages": true,
         "SecurityChecker": {
@@ -131,6 +138,7 @@
       }
     },
     "EMAIL": "detlev@die-offenbachs.de",
+    "EMBEDDED_VENV": false,
     "EOL": 1,
     "FILETYPES": {
       "*.e4p": "OTHERS",
@@ -162,6 +170,7 @@
     },
     "INTERFACES": [],
     "LEXERASSOCS": {},
+    "LICENSE": "GNU General Public License v3 or later (GPLv3+)",
     "MAINSCRIPT": "PluginApis.py",
     "MAKEPARAMS": {
       "MakeEnabled": false,
@@ -206,7 +215,24 @@
       "PluginApis.epj",
       "PluginApis.zip"
     ],
-    "OTHERTOOLSPARMS": {},
+    "OTHERTOOLSPARMS": {
+      "Black": {
+        "exclude": "/(\\.direnv|\\.eggs|\\.git|\\.hg|\\.mypy_cache|\\.nox|\\.tox|\\.venv|venv|\\.svn|_build|buck-out|build|dist|__pypackages__)/",
+        "extend-exclude": "",
+        "force-exclude": "",
+        "line-length": 88,
+        "skip-magic-trailing-comma": false,
+        "skip-string-normalization": false,
+        "source": "project",
+        "target-version": [
+          "py311",
+          "py310",
+          "py39",
+          "py38",
+          "py37"
+        ]
+      }
+    },
     "PACKAGERSPARMS": {},
     "PROGLANGUAGE": "Python3",
     "PROJECTTYPE": "E7Plugin",
@@ -226,6 +252,7 @@
     "SPELLEXCLUDES": "",
     "SPELLLANGUAGE": "en",
     "SPELLWORDS": "",
+    "TESTING_FRAMEWORK": "",
     "TRANSLATIONEXCEPTIONS": [],
     "TRANSLATIONPATTERN": "",
     "TRANSLATIONS": [],
--- a/PluginApis.py	Mon Jun 20 09:19:16 2022 +0200
+++ b/PluginApis.py	Wed Sep 21 17:01:33 2022 +0200
@@ -35,16 +35,16 @@
 def apiFiles(language):
     """
     Module function to return the API files made available by this plugin.
-    
+
     @param language language to get APIs for (string)
     @return list of API filenames (list of string)
     """
     if language in ["Python3", "Python"]:
         apisDir = os.path.join(os.path.dirname(__file__), "APIs", "Python")
-        apis = glob.glob(os.path.join(apisDir, '*.api'))
-        
+        apis = glob.glob(os.path.join(apisDir, "*.api"))
+
         apisDir = os.path.join(os.path.dirname(__file__), "APIs", "Python3")
-        apis.extend(glob.glob(os.path.join(apisDir, '*.api')))
+        apis.extend(glob.glob(os.path.join(apisDir, "*.api")))
         return apis
     else:
         return []
@@ -54,23 +54,24 @@
     """
     Class implementing the Django project plugin.
     """
+
     def __init__(self, ui):
         """
         Constructor
-        
+
         @param ui reference to the user interface object (UI.UserInterface)
         """
         super().__init__(ui)
         self.__ui = ui
-    
+
     def activate(self):
         """
         Public method to activate this plugin.
-        
+
         @return tuple of None and activation status (boolean)
         """
         return None, True
-    
+
     def deactivate(self):
         """
         Public method to deactivate this plugin.

eric ide

mercurial