74 "SimplifyChecker", |
74 "SimplifyChecker", |
75 '''Use a dataclass for "class {0}"'''), |
75 '''Use a dataclass for "class {0}"'''), |
76 "Y120": QCoreApplication.translate( |
76 "Y120": QCoreApplication.translate( |
77 "SimplifyChecker", |
77 "SimplifyChecker", |
78 '''Use "class {0}:" instead of "class {0}(object):"'''), |
78 '''Use "class {0}:" instead of "class {0}(object):"'''), |
79 "Y121": QCoreApplication.translate( |
79 |
|
80 # Python-specifics not part of flake8-simplify |
|
81 "Y181": QCoreApplication.translate( |
80 "SimplifyChecker", |
82 "SimplifyChecker", |
81 '''Use "{0}" instead of "{1}"'''), |
83 '''Use "{0}" instead of "{1}"'''), |
|
84 "Y182": QCoreApplication.translate( |
|
85 "SimplifyChecker", |
|
86 '''Use "super()" instead of "{0}"'''), |
82 |
87 |
83 # Comparations |
88 # Comparations |
84 "Y201": QCoreApplication.translate( |
89 "Y201": QCoreApplication.translate( |
85 "SimplifyChecker", |
90 "SimplifyChecker", |
86 '''Use "{0} != {1}" instead of "not {0} == {1}"'''), |
91 '''Use "{0} != {1}" instead of "not {0} == {1}"'''), |
150 "Y116": ["bar_dict.get(foo, 42)"], |
155 "Y116": ["bar_dict.get(foo, 42)"], |
151 "Y117": ["with Foo() as foo, Bar() as bar:"], |
156 "Y117": ["with Foo() as foo, Bar() as bar:"], |
152 "Y118": ["foo", "bar_dict"], |
157 "Y118": ["foo", "bar_dict"], |
153 "Y119": ["Foo"], |
158 "Y119": ["Foo"], |
154 "Y120": ["Foo"], |
159 "Y120": ["Foo"], |
155 "Y121": ["foo += 42", "foo = foo + 42"], |
160 |
|
161 # Python-specifics not part of flake8-simplify |
|
162 "Y181": ["foo += 42", "foo = foo + 42"], |
|
163 "Y182": ["super(Foo, self)"], |
156 |
164 |
157 # Comparations |
165 # Comparations |
158 "Y201": ["foo", "bar"], |
166 "Y201": ["foo", "bar"], |
159 "Y202": ["foo", "bar"], |
167 "Y202": ["foo", "bar"], |
160 "Y203": ["foo", "bar"], |
168 "Y203": ["foo", "bar"], |