@@ -102,7 +102,9 @@ lint.select = [
102
102
" I" , # isort
103
103
" PGH004" , # pygrep-hooks - Use specific rule codes when using noqa
104
104
" PIE" , # flake8-pie
105
+ " PLC" , # pylint convention
105
106
" PLE" , # pylint error
107
+ " PLR" , # pylint refactor
106
108
" PLR1714" , # Consider merging multiple comparisons
107
109
" PLW" , # pylint warning
108
110
" PYI" , # flake8-pyi
@@ -139,6 +141,17 @@ lint.ignore = [
139
141
# what we're doing when we use type(..) is ...
140
142
" E721" , # Do not compare types, use `isinstance()`
141
143
# pylint ignore
144
+ " PLC0105" , # `TypeVar` name "E" does not reflect its covariance;
145
+ " PLC0414" , # Import alias does not rename original package
146
+ " PLR0124" , # Name compared with itself
147
+ " PLR0133" , # Two constants compared in a comparison (lots of those in tests)
148
+ " PLR0402" , # Use `from x.y import z` in lieu of alias
149
+ " PLR0911" , # Too many return statements
150
+ " PLR0912" , # Too many branches
151
+ " PLR0913" , # Too many arguments in function definition
152
+ " PLR0915" , # Too many statements
153
+ " PLR2004" , # Magic value used in comparison
154
+ " PLR2044" , # Line with empty comment
142
155
" PLR5501" , # Use `elif` instead of `else` then `if`
143
156
" PLW0120" , # remove the else and dedent its contents
144
157
" PLW0603" , # Using the global statement
@@ -191,24 +204,27 @@ disable = [
191
204
" broad-exception-caught" ,
192
205
" broad-exception-raised" ,
193
206
" cell-var-from-loop" , # B023 from ruff / flake8-bugbear
194
- " comparison-of-constants" ,
207
+ " comparison-of-constants" , # disabled in ruff (PLR0133)
195
208
" comparison-with-callable" ,
196
- " comparison-with-itself" ,
209
+ " comparison-with-itself" , # PLR0124 from ruff
197
210
" condition-evals-to-constant" ,
198
211
" consider-using-dict-items" ,
199
212
" consider-using-from-import" ,
200
213
" consider-using-f-string" ,
201
214
" consider-using-in" ,
202
215
" consider-using-ternary" ,
203
216
" consider-using-with" ,
217
+ " consider-using-from-import" , # not activated by default, PLR0402 disabled in ruff
204
218
" cyclic-import" ,
205
219
" disallowed-name" , # foo / bar are used often in tests
206
220
" duplicate-code" ,
221
+ " else-if-used" , # not activated by default, PLR5501 disabled in ruff
222
+ " empty-comment" , # not activated by default, PLR2044 disabled in ruff
207
223
" eval-used" ,
208
224
" exec-used" ,
209
225
" expression-not-assigned" ,
210
226
" fixme" ,
211
- " global-statement" ,
227
+ " global-statement" , # PLW0603 disabled in ruff
212
228
" import-error" ,
213
229
" import-outside-toplevel" ,
214
230
" inconsistent-return-statements" ,
@@ -218,6 +234,7 @@ disable = [
218
234
" invalid-str-returned" ,
219
235
" keyword-arg-before-vararg" ,
220
236
" line-too-long" ,
237
+ " magic-value-comparison" , # not activated by default, PLR2004 disabled in ruff
221
238
" method-hidden" ,
222
239
" missing-docstring" ,
223
240
" missing-timeout" ,
@@ -232,14 +249,15 @@ disable = [
232
249
" no-self-argument" ,
233
250
" not-an-iterable" ,
234
251
" not-callable" ,
235
- " pointless-exception-statement" ,
236
- " pointless-statement" ,
237
- " pointless-string-statement" ,
252
+ " pointless-exception-statement" , # https://github.com/pytest-dev/pytest/pull/12379
253
+ " pointless-statement" , # https://github.com/pytest-dev/pytest/pull/12379
254
+ " pointless-string-statement" , # https://github.com/pytest-dev/pytest/pull/12379
238
255
" possibly-used-before-assignment" ,
239
256
" protected-access" ,
240
257
" raise-missing-from" ,
241
258
" redefined-argument-from-local" ,
242
259
" redefined-builtin" ,
260
+ " redefined-loop-name" , # PLW2901 disabled in ruff
243
261
" redefined-outer-name" ,
244
262
" reimported" ,
245
263
" simplifiable-condition" ,
@@ -249,18 +267,18 @@ disable = [
249
267
" super-init-not-called" ,
250
268
" too-few-public-methods" ,
251
269
" too-many-ancestors" ,
252
- " too-many-arguments" ,
253
- " too-many-branches" ,
270
+ " too-many-arguments" , # disabled in ruff
271
+ " too-many-branches" , # disabled in ruff
254
272
" too-many-function-args" ,
255
273
" too-many-instance-attributes" ,
256
274
" too-many-lines" ,
257
275
" too-many-locals" ,
258
276
" too-many-nested-blocks" ,
259
277
" too-many-public-methods" ,
260
- " too-many-return-statements" ,
261
- " too-many-statements" ,
278
+ " too-many-return-statements" , # disabled in ruff
279
+ " too-many-statements" , # disabled in ruff
262
280
" try-except-raise" ,
263
- " typevar-name-incorrect-variance" ,
281
+ " typevar-name-incorrect-variance" , # PLC0105 disabled in ruff
264
282
" unbalanced-tuple-unpacking" ,
265
283
" undefined-loop-variable" ,
266
284
" undefined-variable" ,
@@ -280,7 +298,7 @@ disable = [
280
298
" use-dict-literal" ,
281
299
" use-implicit-booleaness-not-comparison" ,
282
300
" use-implicit-booleaness-not-len" ,
283
- " useless-else-on-loop" ,
301
+ " useless-else-on-loop" , # PLC0414 disabled in ruff
284
302
" useless-import-alias" ,
285
303
" useless-return" ,
286
304
" using-constant-test" ,
0 commit comments