src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/MiscellaneousChecker.py

branch
eric7
changeset 11148
15e30f0c76a8
parent 11147
dee6e106b4d3
child 11150
73d80859079c
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/MiscellaneousChecker.py	Mon Feb 24 15:11:18 2025 +0100
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/MiscellaneousChecker.py	Mon Feb 24 15:43:49 2025 +0100
@@ -346,7 +346,16 @@
             (self.__checkDictWithSortedKeys, ("M-251",)),
             (
                 self.__checkProperties,
-                ("M-260", "M-261", "M-262", "M-263", "M-264", "M-265", "M-266", "M-267"),
+                (
+                    "M-260",
+                    "M-261",
+                    "M-262",
+                    "M-263",
+                    "M-264",
+                    "M-265",
+                    "M-266",
+                    "M-267",
+                ),
             ),
             (
                 self.__checkDateTime,
@@ -714,7 +723,10 @@
                 )
             else:
                 self.__error(
-                    node.lineno - 1, node.col_offset, "M-702", ", ".join(expectedImports)
+                    node.lineno - 1,
+                    node.col_offset,
+                    "M-702",
+                    ", ".join(expectedImports),
                 )
 
     def __checkPep3101(self):
@@ -819,7 +831,9 @@
 
                     for name in sorted(names):
                         if name not in keywords:
-                            self.__error(call.lineno - 1, call.col_offset, "M-622", name)
+                            self.__error(
+                                call.lineno - 1, call.col_offset, "M-622", name
+                            )
 
                 for arg in range(numArgs):
                     if arg not in numbers:
@@ -1063,7 +1077,9 @@
                     and numKeywordArgs == 0
                     and node.func.id in ("tuple", "list")
                 ):
-                    self.__error(node.lineno - 1, node.col_offset, "M-188", node.func.id)
+                    self.__error(
+                        node.lineno - 1, node.col_offset, "M-188", node.func.id
+                    )
 
                 elif (
                     node.func.id in {"list", "reversed"}
@@ -1147,7 +1163,9 @@
                     and isinstance(node.args[0].slice.step.operand, ast.Constant)
                     and node.args[0].slice.step.operand.n == 1
                 ):
-                    self.__error(node.lineno - 1, node.col_offset, "M-195", node.func.id)
+                    self.__error(
+                        node.lineno - 1, node.col_offset, "M-195", node.func.id
+                    )
 
                 elif (
                     node.func.id == "map"
@@ -1156,7 +1174,10 @@
                     and isinstance(node.args[0], ast.Lambda)
                 ):
                     self.__error(
-                        node.lineno - 1, node.col_offset, "M-197", "generator expression"
+                        node.lineno - 1,
+                        node.col_offset,
+                        "M-197",
+                        "generator expression",
                     )
 
                 elif (
@@ -1489,7 +1510,9 @@
         for a, b in pairwise(tokensWithoutWhitespace):
             if self.__isImplicitStringConcat(a, b):
                 self.__error(
-                    a.end[0] - 1, a.end[1], "M-851" if a.end[0] == b.start[0] else "M-852"
+                    a.end[0] - 1,
+                    a.end[1],
+                    "M-851" if a.end[0] == b.start[0] else "M-852",
                 )
 
     def __checkExplicitStringConcat(self):
@@ -2869,7 +2892,7 @@
 
         @param node reference to the node to be processed
         @type ast.ClassDef
-        """  # __IGNORE_WARNING_D234r__
+        """  # __IGNORE_WARNING_D-234r__
 
         def isAbcClass(value, name="ABC"):
             if isinstance(value, ast.keyword):
@@ -3192,7 +3215,7 @@
 
         @param node reference to the node to be processed
         @type ast.expr or None
-        """  # noqa: D234y
+        """  # noqa: D-234y
 
         def superwalk(node: ast.AST | list[ast.AST]):
             """
@@ -3223,7 +3246,7 @@
 
         @param node reference to the node to be processed
         @type ast.Dict
-        """  # noqa: D234r
+        """  # noqa: D-234r
 
         def convertToValue(item):
             """
@@ -4551,4 +4574,4 @@
 
 
 #
-# eflag: noqa = M891
+# eflag: noqa = M-891

eric ide

mercurial