|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2021 - 2023 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing message translations for the code style plugin |
|
8 (name ordering part). |
|
9 """ |
|
10 |
|
11 from PyQt6.QtCore import QCoreApplication |
|
12 |
|
13 _nameOrderMessages = { |
|
14 "NO101": QCoreApplication.translate( |
|
15 "ImportsChecker", |
|
16 "Import statements are in the wrong order. '{0}' should be before '{1}'", |
|
17 ), |
|
18 "NO102": QCoreApplication.translate( |
|
19 "ImportsChecker", "Imported names are in the wrong order. Should be '{0}'" |
|
20 ), |
|
21 "NO103": QCoreApplication.translate( |
|
22 "ImportsChecker", |
|
23 "Import statements should be combined. '{0}' should be combined with '{1}'", |
|
24 ), |
|
25 "NO104": QCoreApplication.translate( |
|
26 "ImportsChecker", |
|
27 "The names in __all__ are in the wrong order. The order should be '{0}'", |
|
28 ), |
|
29 "NO105": QCoreApplication.translate( |
|
30 "ImportsChecker", |
|
31 "The names in the exception handler list are in the wrong order. The order" |
|
32 " should be '{0}'", |
|
33 ), |
|
34 } |
|
35 |
|
36 _nameOrderMessagesSampleArgs = { |
|
37 "NO101": ["import bar", "import foo"], |
|
38 "NO102": ["bar, baz, foo"], |
|
39 "NO103": ["from foo import bar", "from foo import baz"], |
|
40 "NO104": ["bar, baz, foo"], |
|
41 "NO105": ["BarError, BazError, FooError"], |
|
42 } |