eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/translations.py

changeset 8194
b925628bf91f
parent 8192
e1157bd8b4c2
child 8195
db7f2badd374
equal deleted inserted replaced
8193:2aa8953a2145 8194:b925628bf91f
32 "SimplifyChecker", 32 "SimplifyChecker",
33 '''Handle error-cases first'''), 33 '''Handle error-cases first'''),
34 "Y107": QCoreApplication.translate( 34 "Y107": QCoreApplication.translate(
35 "SimplifyChecker", 35 "SimplifyChecker",
36 '''Don't use return in try/except and finally'''), 36 '''Don't use return in try/except and finally'''),
37 "Y108a": QCoreApplication.translate( 37 "Y108": QCoreApplication.translate(
38 "SimplifyChecker",
39 '''Use ternary operator instead of if-else-block'''),
40 "Y108b": QCoreApplication.translate(
41 "SimplifyChecker", 38 "SimplifyChecker",
42 '''Use ternary operator "{0} = {1} if {2} else {3}" ''' 39 '''Use ternary operator "{0} = {1} if {2} else {3}" '''
43 '''instead of if-else-block'''), 40 '''instead of if-else-block'''),
44 "Y109": QCoreApplication.translate( 41 "Y109": QCoreApplication.translate(
45 "SimplifyChecker", 42 "SimplifyChecker",
73 "SimplifyChecker", 70 "SimplifyChecker",
74 '''Use "{0} in {1}" instead of "{0} in {1}.keys()"'''), 71 '''Use "{0} in {1}" instead of "{0} in {1}.keys()"'''),
75 "Y119": QCoreApplication.translate( 72 "Y119": QCoreApplication.translate(
76 "SimplifyChecker", 73 "SimplifyChecker",
77 '''Use a dataclass for "class {0}"'''), 74 '''Use a dataclass for "class {0}"'''),
75 "Y120": QCoreApplication.translate(
76 "SimplifyChecker",
77 '''Use "class {0}:" instead of "class {0}(object):"'''),
78 } 78 }
79 79
80 _simplifyMessagesSampleArgs = { 80 _simplifyMessagesSampleArgs = {
81 "Y101": ["foo"], 81 "Y101": ["foo"],
82 "Y103": ["foo != bar"], 82 "Y103": ["foo != bar"],
83 "Y104": ["iterable"], 83 "Y104": ["iterable"],
84 "Y105": ["Exception"], 84 "Y105": ["Exception"],
85 "Y108b": ["foo", "bar", "condition", "baz"], 85 "Y108": ["foo", "bar", "condition", "baz"],
86 "Y109": ["foo", "[1, 42]", "foo == 1 or foo == 42"], 86 "Y109": ["foo", "[1, 42]", "foo == 1 or foo == 42"],
87 "Y110": ["check", "foo", "iterable"], 87 "Y110": ["check", "foo", "iterable"],
88 "Y111": ["check", "foo", "iterable"], 88 "Y111": ["check", "foo", "iterable"],
89 "Y112": ["FOO", "foo"], 89 "Y112": ["FOO", "foo"],
90 "Y113": ["foo"], 90 "Y113": ["foo"],
91 "Y114": ["foo > 42", "bar < 42"], 91 "Y114": ["foo > 42", "bar < 42"],
92 "Y116": ["mapping.get(foo, 42)"], 92 "Y116": ["mapping.get(foo, 42)"],
93 "Y117": ["with Foo() as foo, Bar() as bar:"], 93 "Y117": ["with Foo() as foo, Bar() as bar:"],
94 "Y118": ["foo", "bar_dict"], 94 "Y118": ["foo", "bar_dict"],
95 "Y119": ["Foo"] 95 "Y119": ["Foo"],
96 "Y120": ["Foo"],
96 } 97 }

eric ide

mercurial