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

branch
eric7
changeset 8759
7efebdfa5dc2
parent 8318
962bce857696
child 8881
54e42bc2437a
diff -r 23b2fe1cd863 -r 7efebdfa5dc2 eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/translations.py
--- a/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/translations.py	Tue Nov 02 18:02:00 2021 +0100
+++ b/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/translations.py	Wed Nov 03 19:34:56 2021 +0100
@@ -50,9 +50,22 @@
     "M186": QCoreApplication.translate(
         "MiscellaneousChecker",
         'unnecessary {0} call - rewrite as a literal'),
-    "M187": QCoreApplication.translate(
+    "M187a": QCoreApplication.translate(
+        "MiscellaneousChecker",
+        'unnecessary {0} call around {1}()'
+        ' - toggle reverse argument to sorted()'),
+    "M187b": QCoreApplication.translate(
         "MiscellaneousChecker",
-        'unnecessary list comprehension - "{0}" can take a generator'),
+        'unnecessary {0} call around {1}() - use sorted(..., reverse={2})'),
+    "M187c": QCoreApplication.translate(
+        "MiscellaneousChecker",
+        'unnecessary {0} call around {1}()'),
+    "M188": QCoreApplication.translate(
+        "MiscellaneousChecker",
+        'unnecessary {0} call within {1}()'),
+    "M189": QCoreApplication.translate(
+        "MiscellaneousChecker",
+        'unnecessary subscript reversal of iterable within {0}()'),
     "M191": QCoreApplication.translate(
         "MiscellaneousChecker",
         'unnecessary {0} literal - rewrite as a {1} literal'),
@@ -67,7 +80,7 @@
         'unnecessary list call - remove the outer call to list()'),
     "M196": QCoreApplication.translate(
         "MiscellaneousChecker",
-        'unnecessary list comprehension - "in" can take a generator'),
+        'unnecessary {0} comprehension - rewrite using {0}()'),
     "M197": QCoreApplication.translate(
         "MiscellaneousChecker",
         'unnecessary {0} passed to tuple() - remove the outer call to {1}()'),
@@ -325,11 +338,16 @@
     "M102": ["enc42"],
     "M131": ["list"],
     "M132": ["list"],
-    "M188": ["sorted"],
     "M186": ["list"],
+    "M187a": ["reversed", "sorted"],
+    "M187b": ["reversed", "sorted", "True"],
+    "M187c": ["list", "sorted"],
+    "M188": ["sorted", "list"],
+    "M189": ["sorted"],
     "M191": ["list", "set"],
     "M192": ["list", "tuple"],
     "M193": ["tuple", "list"],
+    "M196": ["list"],
     "M197": ["tuple", "tuple"],
     "M198": ["list", "list"],
     "M201": ["bar", "foo"],

eric ide

mercurial