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

branch
eric7
changeset 11138
1f743bad6fd3
parent 11090
f5f5f5803935
child 11140
b823386f7591
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/translations.py	Sun Feb 16 14:56:07 2025 +0100
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/translations.py	Sun Feb 16 15:05:39 2025 +0100
@@ -346,17 +346,17 @@
     "M512": QCoreApplication.translate(
         "MiscellaneousChecker",
         "return/continue/break inside finally blocks cause exceptions to be silenced."
-        " Exceptions should be silenced in except blocks. Control statements can be"
+        " Exceptions should be silenced in except{0} blocks. Control statements can be"
         " moved outside the finally block.",
     ),
     "M513": QCoreApplication.translate(
         "MiscellaneousChecker",
-        "A length-one tuple literal is redundant. Write 'except {0}:' instead of"
-        " 'except ({0},):'.",
+        "A length-one tuple literal is redundant. Write 'except{1} {0}:' instead of"
+        " 'except{1} ({0},):'.",
     ),
     "M514": QCoreApplication.translate(
         "MiscellaneousChecker",
-        "Redundant exception types in 'except ({0}){1}:'. Write 'except {2}{1}:',"
+        "Redundant exception types in 'except{3} ({0}){1}:'. Write 'except{3} {2}{1}:',"
         " which catches exactly the same exceptions.",
     ),
     "M515": QCoreApplication.translate(
@@ -416,8 +416,8 @@
     ),
     "M525": QCoreApplication.translate(
         "MiscellaneousChecker",
-        "Exception '{0}' has been caught multiple times. Only the first except will be"
-        " considered and all other except catches can be safely removed.",
+        "Exception '{0}' has been caught multiple times. Only the first except{1} will"
+        " be considered and all other except{1} catches can be safely removed.",
     ),
     "M526": QCoreApplication.translate(
         "MiscellaneousChecker",
@@ -441,7 +441,7 @@
     ),
     "M529": QCoreApplication.translate(
         "MiscellaneousChecker",
-        "Using 'except ():' with an empty tuple does not handle/catch "
+        "Using 'except{0} ():' with an empty tuple does not handle/catch "
         "anything. Add exceptions to handle.",
     ),
     "M530": QCoreApplication.translate(
@@ -479,7 +479,7 @@
     ),
     "M537": QCoreApplication.translate(
         "MiscellaneousChecker",
-        "Class '__init__' methods must not return or yield and any values.",
+        "Class '__init__' methods must not return or yield any values.",
     ),
     "M539": QCoreApplication.translate(
         "MiscellaneousChecker",
@@ -491,6 +491,10 @@
         "MiscellaneousChecker",
         "Exception with added note not used. Did you forget to raise it?",
     ),
+    "M541": QCoreApplication.translate(
+        "MiscellaneousChecker",
+        "Repeated key-value pair in dictionary literal.",
+    ),
     ## Bugbear, opininonated
     "M569": QCoreApplication.translate(
         "MiscellaneousChecker",
@@ -671,13 +675,15 @@
     "M267": ["foo"],
     ## Bugbear
     "M507": ["x"],
-    "M513": ["Exception"],
-    "M514": ["OSError, IOError", " as err", "OSError"],
+    "M512": [""],
+    "M513": ["Exception", ""],
+    "M514": ["OSError, IOError", " as err", "OSError", ""],
     "M518": ["List"],
     "M523": ["x"],
     "M524": ["foobar"],
-    "M525": ["OSError"],
+    "M525": ["OSError", ""],
     "M527": ["foo"],
+    "M529": [""],
     "M533": ["foo"],
     "M534": ["split", "maxsplit"],
     "M535": ["foo"],

eric ide

mercurial