src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py

branch
eric7
changeset 10683
779cda568acb
parent 10439
21c28b0f9e41
child 10690
fab36645aa7d
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py	Tue Apr 16 15:47:11 2024 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py	Sat Apr 20 18:01:36 2024 +0200
@@ -534,7 +534,7 @@
 
         return self.__multiLineNumbers, self.__docLineNumbers
 
-    def __fixReindent(self, line, pos, logical):  # noqa: U100
+    def __fixReindent(self, line, _pos, logical):
         """
         Private method to fix a badly indented line.
 
@@ -542,7 +542,7 @@
 
         @param line line number of the issue
         @type int
-        @param pos position inside line
+        @param _pos position inside line (unused)
         @type int
         @param logical logical line structure
         @type str
@@ -604,17 +604,17 @@
         else:
             return left + replacement + right
 
-    def __fixD111(self, code, line, pos):  # noqa: U100
+    def __fixD111(self, _code, line, _pos):
         """
         Private method to fix docstring enclosed in wrong quotes.
 
         Codes: D111
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
-        @param pos position inside line
+        @param _pos position inside line (unused)
         @type int
         @return value indicating an applied/deferred fix (-1, 0, 1),
             a message code for the fix, a list of arguments for the
@@ -635,7 +635,7 @@
         # Triple single quotes converted to triple double quotes.
         return (1, "FIXD111", [], 0)
 
-    def __fixD112(self, code, line, pos):  # noqa: U100
+    def __fixD112(self, code, line, _pos):
         """
         Private method to fix docstring 'r' in leading quotes.
 
@@ -645,7 +645,7 @@
         @type str
         @param line line number of the issue
         @type int
-        @param pos position inside line
+        @param _pos position inside line (unused)
         @type int
         @return value indicating an applied/deferred fix (-1, 0, 1),
             a message code for the fix, a list of arguments for the
@@ -708,18 +708,18 @@
             self.__stack.append((fixId, code, line, pos))
             return (-1, "", [], fixId)
 
-    def __fixD131(self, code, line, pos):  # noqa: U100
+    def __fixD131(self, _code, line, _pos):
         """
         Private method to fix a docstring summary not ending with a
         period.
 
         Codes: D131
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
-        @param pos position inside line
+        @param _pos position inside line (unused)
         @type int
         @return value indicating an applied/deferred fix (-1, 0, 1),
             a message code for the fix, a list of arguments for the
@@ -1057,7 +1057,7 @@
             self.__stack.append((fixId, code, line, pos))
             return (-1, "", [], fixId)
 
-    def __fixE101(self, code, line, pos):  # noqa: U100
+    def __fixE101(self, code, line, _pos):
         """
         Private method to fix obsolete tab usage and indentation errors.
 
@@ -1067,7 +1067,7 @@
         @type str
         @param line line number of the issue
         @type int
-        @param pos position inside line
+        @param _pos position inside line (unused)
         @type int
         @return value indicating an applied/deferred fix (-1, 0, 1),
             a message code for the fix, a list of arguments for the
@@ -1359,13 +1359,13 @@
             self.__stackLogical.append((fixId, code, line, pos))
             return (-1, "", [], fixId)
 
-    def __fixE201(self, code, line, pos):  # noqa: U100
+    def __fixE201(self, _code, line, pos):
         """
         Private method to fix extraneous whitespace.
 
         Codes: E201, E202, E203, E211
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
@@ -1390,14 +1390,14 @@
         # Extraneous whitespace removed.
         return (1, "FIXE201", [], 0)
 
-    def __fixE221(self, code, line, pos):  # noqa: U100
+    def __fixE221(self, _code, line, pos):
         """
         Private method to fix extraneous whitespace around operator or
         keyword.
 
         Codes: E221, E222, E223, E224, E241, E242, E271, E272, E273, E274
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
@@ -1421,13 +1421,13 @@
         self.__source[line] = newText
         return (1, "FIXE221", [], 0)
 
-    def __fixE225(self, code, line, pos):  # noqa: U100
+    def __fixE225(self, _code, line, pos):
         """
         Private method to fix extraneous whitespaces around operator.
 
         Codes: E225, E226, E227, E228
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
@@ -1466,13 +1466,13 @@
         # Missing whitespaces added.
         return (1, "FIXE225", [], 0)
 
-    def __fixE231(self, code, line, pos):  # noqa: U100
+    def __fixE231(self, _code, line, pos):
         """
         Private method to fix missing whitespace after ',;:'.
 
         Codes: E231
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
@@ -1491,14 +1491,14 @@
         # Missing whitespace added.
         return (1, "FIXE231", [], 0)
 
-    def __fixE251(self, code, line, pos):  # noqa: U100
+    def __fixE251(self, _code, line, pos):
         """
         Private method to fix extraneous whitespace around keyword and
         default parameter equals.
 
         Codes: E251
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
@@ -1529,13 +1529,13 @@
         # Extraneous whitespace removed.
         return (1, "FIXE251", [], 0)
 
-    def __fixE261(self, code, line, pos):  # noqa: U100
+    def __fixE261(self, _code, line, pos):
         """
         Private method to fix whitespace before or after inline comment.
 
         Codes: E261, E262
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
@@ -1756,17 +1756,17 @@
             self.__stack.append((fixId, code, line, pos))
             return (-1, "", [], fixId)
 
-    def __fixE502(self, code, line, pos):  # noqa: U100
+    def __fixE502(self, _code, line, _pos):
         """
         Private method to fix redundant backslash within brackets.
 
         Codes: E502
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
-        @param pos position inside line
+        @param _pos position inside line (unused)
         @type int
         @return value indicating an applied/deferred fix (-1, 0, 1),
             a message code for the fix, a list of arguments for the
@@ -1859,13 +1859,13 @@
             self.__stack.append((fixId, code, line, pos))
             return (-1, "", [], fixId)
 
-    def __fixE711(self, code, line, pos):  # noqa: U100
+    def __fixE711(self, _code, line, pos):
         """
         Private method to fix comparison with None.
 
         Codes: E711, E712
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
@@ -2019,17 +2019,17 @@
             self.__stack.append((fixId, code, line, pos))
             return (-1, "", [], fixId)
 
-    def __fixW291(self, code, line, pos):  # noqa: U100
+    def __fixW291(self, _code, line, _pos):
         """
         Private method to fix trailing whitespace.
 
         Codes: W291, W293
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
-        @param pos position inside line
+        @param _pos position inside line (unused)
         @type int
         @return value indicating an applied/deferred fix (-1, 0, 1),
             a message code for the fix, a list of arguments for the
@@ -2042,17 +2042,17 @@
         # Whitespace stripped from end of line.
         return (1, "FIXW291", [], 0)
 
-    def __fixW292(self, code, line, pos):  # noqa: U100
+    def __fixW292(self, _code, line, _pos):
         """
         Private method to fix a missing newline at the end of file.
 
         Codes: W292
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
-        @param pos position inside line
+        @param _pos position inside line (unused)
         @type int
         @return value indicating an applied/deferred fix (-1, 0, 1),
             a message code for the fix, a list of arguments for the
@@ -2063,17 +2063,17 @@
         # newline added to end of file.
         return (1, "FIXW292", [], 0)
 
-    def __fixW391(self, code, line, pos):  # noqa: U100
+    def __fixW391(self, _code, line, _pos):
         """
         Private method to fix trailing blank lines.
 
         Codes: W391
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
-        @param pos position inside line
+        @param _pos position inside line (unused)
         @type int
         @return value indicating an applied/deferred fix (-1, 0, 1),
             a message code for the fix, a list of arguments for the
@@ -2090,17 +2090,17 @@
         # Superfluous trailing blank lines removed from end of file.
         return (1, "FIXW391", [], 0)
 
-    def __fixW603(self, code, line, pos):  # noqa: U100
+    def __fixW603(self, _code, line, _pos):
         """
         Private method to fix the not equal notation.
 
         Codes: W603
 
-        @param code code of the issue
+        @param _code code of the issue (unused)
         @type str
         @param line line number of the issue
         @type int
-        @param pos position inside line
+        @param _pos position inside line (unused)
         @type int
         @return value indicating an applied/deferred fix (-1, 0, 1),
             a message code for the fix, a list of arguments for the

eric ide

mercurial