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

branch
eric7
changeset 8808
033fa34447d0
parent 8802
129a973fc33e
child 8881
54e42bc2437a
diff -r f4486646a233 -r 033fa34447d0 eric7/Plugins/CheckerPlugins/CodeStyleChecker/Imports/translations.py
--- a/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Imports/translations.py	Sat Dec 04 17:41:18 2021 +0100
+++ b/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Imports/translations.py	Sat Dec 04 18:06:17 2021 +0100
@@ -28,7 +28,7 @@
     "I202": QCoreApplication.translate(
         "ImportsChecker",
         "Imported names are in the wrong order. "
-        "Should be {0}"),
+        "Should be '{0}'"),
     "I203": QCoreApplication.translate(
         "ImportsChecker",
         "Import statements should be combined. "
@@ -36,12 +36,27 @@
     "I204": QCoreApplication.translate(
         "ImportsChecker",
         "The names in __all__ are in the wrong order. "
-        "The order should be {0}"),
+        "The order should be '{0}'"),
+    
+    "I901": QCoreApplication.translate(
+        "ImportsChecker",
+        "unnecessary import alias - rewrite as '{0}'"),
+    "I902": QCoreApplication.translate(
+        "ImportsChecker",
+        "banned import '{0}' used"),
+    "I903": QCoreApplication.translate(
+        "ImportsChecker",
+        "relative imports from parent modules are banned"),
+    "I904": QCoreApplication.translate(
+        "ImportsChecker",
+        "relative imports are banned"),
 }
 
 _importsMessagesSampleArgs = {
-    "I201": ["import os", "import sys"],
-    "I202": ["copy, os, sys"],
+    "I201": ["import bar", "import foo"],
+    "I202": ["bar, baz, foo"],
     "I203": ["from foo import bar", "from foo import baz"],
     "I204": ["bar, baz, foo"],
+    "I901": ["from foo import bar"],
+    "I902": ["foo"],
 }

eric ide

mercurial