--- 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"], }