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

branch
eric7
changeset 10510
fa7b8ebfbe13
parent 10439
21c28b0f9e41
child 10639
757bfe32983f
diff -r 094ab8028423 -r fa7b8ebfbe13 src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/translations.py
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/translations.py	Thu Jan 18 09:25:11 2024 +0100
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/translations.py	Thu Jan 18 13:10:08 2024 +0100
@@ -284,8 +284,8 @@
     "M501": QCoreApplication.translate(
         "MiscellaneousChecker",
         "Do not use bare 'except:', it also catches unexpected events like memory"
-        " errors, interrupts, system exit, and so on. Prefer 'except Exception:'."
-        " If you're sure what you're doing, be explicit and write"
+        " errors, interrupts, system exit, and so on. Prefer excepting specific"
+        " exceptions. If you're sure what you're doing, be explicit and write"
         " 'except BaseException:'.",
     ),
     "M502": QCoreApplication.translate(
@@ -361,7 +361,7 @@
     ),
     "M518": QCoreApplication.translate(
         "MiscellaneousChecker",
-        "Found useless expression. Consider either assigning it to a variable or"
+        "Found useless {0} expression. Consider either assigning it to a variable or"
         " removing it.",
     ),
     "M519": QCoreApplication.translate(
@@ -455,6 +455,18 @@
         "MiscellaneousChecker",
         "Static key in dict comprehension: {0!r}.",
     ),
+    "M536": QCoreApplication.translate(
+        "MiscellaneousChecker",
+        "Don't except 'BaseException' unless you plan to re-raise it.",
+    ),
+    "M537": QCoreApplication.translate(
+        "MiscellaneousChecker",
+        "Class '__init__' methods must not return or yield and any values.",
+    ),
+    "M538": QCoreApplication.translate(
+        "MiscellaneousChecker",
+        "Editing a loop's mutable iterable often leads to unexpected results/bugs.",
+    ),
     ## Bugbear++
     "M581": QCoreApplication.translate(
         "MiscellaneousChecker",
@@ -631,6 +643,7 @@
     "M507": ["x"],
     "M513": ["Exception"],
     "M514": ["OSError, IOError", " as err", "OSError"],
+    "M518": ["List"],
     "M523": ["x"],
     "M524": ["foobar"],
     "M525": ["OSError"],

eric ide

mercurial