10 """ |
10 """ |
11 |
11 |
12 from PyQt6.QtCore import QCoreApplication |
12 from PyQt6.QtCore import QCoreApplication |
13 |
13 |
14 _namingStyleMessages = { |
14 _namingStyleMessages = { |
15 "N801": QCoreApplication.translate( |
15 "N-801": QCoreApplication.translate( |
16 "NamingStyleChecker", "class names should use CapWords convention" |
16 "NamingStyleChecker", "class names should use CapWords convention" |
17 ), |
17 ), |
18 "N802": QCoreApplication.translate( |
18 "N-802": QCoreApplication.translate( |
19 "NamingStyleChecker", "function name should be lowercase" |
19 "NamingStyleChecker", "function name should be lowercase" |
20 ), |
20 ), |
21 "N803": QCoreApplication.translate( |
21 "N-803": QCoreApplication.translate( |
22 "NamingStyleChecker", "argument name should be lowercase" |
22 "NamingStyleChecker", "argument name should be lowercase" |
23 ), |
23 ), |
24 "N804": QCoreApplication.translate( |
24 "N-804": QCoreApplication.translate( |
25 "NamingStyleChecker", "first argument of a class method should be named 'cls'" |
25 "NamingStyleChecker", "first argument of a class method should be named 'cls'" |
26 ), |
26 ), |
27 "N805": QCoreApplication.translate( |
27 "N-805": QCoreApplication.translate( |
28 "NamingStyleChecker", "first argument of a method should be named 'self'" |
28 "NamingStyleChecker", "first argument of a method should be named 'self'" |
29 ), |
29 ), |
30 "N806": QCoreApplication.translate( |
30 "N-806": QCoreApplication.translate( |
31 "NamingStyleChecker", |
31 "NamingStyleChecker", |
32 "first argument of a static method should not be named 'self' or 'cls", |
32 "first argument of a static method should not be named 'self' or 'cls", |
33 ), |
33 ), |
34 "N807": QCoreApplication.translate( |
34 "N-807": QCoreApplication.translate( |
35 "NamingStyleChecker", "module names should be lowercase" |
35 "NamingStyleChecker", "module names should be lowercase" |
36 ), |
36 ), |
37 "N808": QCoreApplication.translate( |
37 "N-808": QCoreApplication.translate( |
38 "NamingStyleChecker", "package names should be lowercase" |
38 "NamingStyleChecker", "package names should be lowercase" |
39 ), |
39 ), |
40 "N809": QCoreApplication.translate( |
40 "N-809": QCoreApplication.translate( |
41 "NamingStyleChecker", "function name should not start and end with '__'" |
41 "NamingStyleChecker", "function name should not start and end with '__'" |
42 ), |
42 ), |
43 "N811": QCoreApplication.translate( |
43 "N-811": QCoreApplication.translate( |
44 "NamingStyleChecker", "constant imported as non constant" |
44 "NamingStyleChecker", "constant imported as non constant" |
45 ), |
45 ), |
46 "N812": QCoreApplication.translate( |
46 "N-812": QCoreApplication.translate( |
47 "NamingStyleChecker", "lowercase imported as non lowercase" |
47 "NamingStyleChecker", "lowercase imported as non lowercase" |
48 ), |
48 ), |
49 "N813": QCoreApplication.translate( |
49 "N-813": QCoreApplication.translate( |
50 "NamingStyleChecker", "camelcase imported as lowercase" |
50 "NamingStyleChecker", "camelcase imported as lowercase" |
51 ), |
51 ), |
52 "N814": QCoreApplication.translate( |
52 "N-814": QCoreApplication.translate( |
53 "NamingStyleChecker", "camelcase imported as constant" |
53 "NamingStyleChecker", "camelcase imported as constant" |
54 ), |
54 ), |
55 "N815": QCoreApplication.translate( |
55 "N-815": QCoreApplication.translate( |
56 "NamingStyleChecker", "camelcase imported as acronym" |
56 "NamingStyleChecker", "camelcase imported as acronym" |
57 ), |
57 ), |
58 "N818": QCoreApplication.translate( |
58 "N-818": QCoreApplication.translate( |
59 "NamingStyleChecker", "exception name should be named with an 'Error' suffix" |
59 "NamingStyleChecker", "exception name should be named with an 'Error' suffix" |
60 ), |
60 ), |
61 "N821": QCoreApplication.translate( |
61 "N-821": QCoreApplication.translate( |
62 "NamingStyleChecker", "variable in function should be lowercase" |
62 "NamingStyleChecker", "variable in function should be lowercase" |
63 ), |
63 ), |
64 "N822": QCoreApplication.translate( |
64 "N-822": QCoreApplication.translate( |
65 "NamingStyleChecker", "variable in class scope should not be mixed case" |
65 "NamingStyleChecker", "variable in class scope should not be mixed case" |
66 ), |
66 ), |
67 "N823": QCoreApplication.translate( |
67 "N-823": QCoreApplication.translate( |
68 "NamingStyleChecker", "variable in global scope should not be mixed case" |
68 "NamingStyleChecker", "variable in global scope should not be mixed case" |
69 ), |
69 ), |
70 "N831": QCoreApplication.translate( |
70 "N-831": QCoreApplication.translate( |
71 "NamingStyleChecker", "names 'l', 'O' and 'I' should be avoided" |
71 "NamingStyleChecker", "names 'l', 'O' and 'I' should be avoided" |
72 ), |
72 ), |
73 } |
73 } |