src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Unused/UnusedChecker.py

branch
eric7
changeset 11147
dee6e106b4d3
parent 11145
d328a7b74fd8
child 11150
73d80859079c
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Unused/UnusedChecker.py	Sun Feb 23 12:42:47 2025 +0100
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Unused/UnusedChecker.py	Mon Feb 24 15:11:18 2025 +0100
@@ -21,10 +21,10 @@
 
     Codes = [
         ## Unused Arguments
-        "U100",
-        "U101",
+        "U-100",
+        "U-101",
         ## Unused Globals
-        "U200",
+        "U-200",
     ]
 
     def __init__(self, source, filename, tree, select, ignore, expected, repeat, args):
@@ -64,8 +64,8 @@
         self.errors = []
 
         checkersWithCodes = [
-            (self.__checkUnusedArguments, ("U100", "U101")),
-            (self.__checkUnusedGlobals, ("U200",)),
+            (self.__checkUnusedArguments, ("U-100", "U-101")),
+            (self.__checkUnusedGlobals, ("U-200",)),
         ]
 
         self.__checkers = []
@@ -212,7 +212,7 @@
                 lineNumber = argument.lineno
                 offset = argument.col_offset
 
-                errorCode = "U101" if name.startswith("_") else "U100"
+                errorCode = "U-101" if name.startswith("_") else "U-100"
                 self.__error(lineNumber - 1, offset, errorCode, name)
 
     def __getDecoratorNames(self, functionNode):
@@ -406,7 +406,7 @@
         for varId, loads in loadCounter.getLoads():
             if varId in globalVariables and loads == 0:
                 storeInfo = loadCounter.getStoreInfo(varId)
-                errorInfo = (storeInfo.lineno - 1, storeInfo.offset, "U200", varId)
+                errorInfo = (storeInfo.lineno - 1, storeInfo.offset, "U-200", varId)
                 errors[varId] = errorInfo
 
         for node in self.__tree.body[::-1]:

eric ide

mercurial