Skip to content

Commit 252b8fb

Browse files
committed
Clean up pylint rules
1 parent eee07dd commit 252b8fb

File tree

1 file changed

+14
-45
lines changed

1 file changed

+14
-45
lines changed

pyproject.toml

+14-45
Original file line numberDiff line numberDiff line change
@@ -260,18 +260,8 @@ ignore = [
260260
"B023",
261261
# Only works with python >=3.10
262262
"B905",
263-
# Too many arguments to function call
264-
"PLR0913",
265-
# Too many returns
266-
"PLR0911",
267-
# Too many branches
268-
"PLR0912",
269-
# Too many statements
270-
"PLR0915",
271263
# Redefined loop name
272264
"PLW2901",
273-
# Global statements are discouraged
274-
"PLW0603",
275265
# Use `typing.NamedTuple` instead of `collections.namedtuple`
276266
"PYI024",
277267
# No builtin `eval()` allowed
@@ -318,47 +308,26 @@ ignore = [
318308
"RUF007",
319309
# mutable-class-default
320310
"RUF012",
321-
# Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
322-
# "E721",
323-
# Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
324-
"RUF021",
325-
# `__all__` is not sorted
326-
"RUF022",
327-
# Use a `set` literal when testing for membership
328-
"PLR6201",
311+
312+
# Additional pylint rules
313+
# literal-membership
314+
"PLR6201", # 847 errors
329315
# Method could be a function, class method, or static method
330-
"PLR6301",
316+
"PLR6301", # 11411 errors
331317
# Too many positional arguments (6/5)
332-
"PLR0917",
333-
# `import` should be at the top-level of a file
334-
"PLC0415",
335-
# Too many public methods (23 > 20)
336-
"PLR0904",
337-
# Too many local variables
338-
"PLR0914",
339-
# Too many nested blocks (6 > 5)
340-
"PLR1702",
341-
# Too many Boolean expressions
342-
"PLR0916",
318+
"PLR0917", # 470 errors
343319
# Private name import
344-
"PLC2701",
345-
# Redefining argument with the local name
346-
"PLR1704",
347-
# Unnecessary dunder call
348-
"PLC2801",
349-
# Lambda may be unnecessary; consider inlining inner function
350-
# Autofix might not be correct
351-
"PLW0108",
320+
"PLC2701", # 27 errors
352321
# Object does not implement `__hash__` method
353-
"PLW1641",
322+
"PLW1641", # 16 errors
354323
# `tempfile.NamedTemporaryFile` in text mode without explicit `encoding` argument
355-
"PLW1514",
324+
"PLW1514", # 1 error
356325
# Bad or misspelled dunder method name
357-
"PLW3201",
326+
"PLW3201", # 69 errors, seems to be all false positive
358327
# Unnecessary lookup of dictionary value by key
359-
"PLR1733",
328+
"PLR1733", # 5 errors, it seems like we wannt to ignore these
360329
# Unnecessary lookup of list item by index
361-
"PLR1736",
330+
"PLR1736", # 4 errors, we're currently having inline pylint ignore
362331

363332
# Output of pylint-to-ruff
364333
# "PLC0103", # invalid-name
@@ -374,7 +343,7 @@ ignore = [
374343
# "PLC0411", # wrong-import-order
375344
# "PLC0412", # ungrouped-imports
376345
# "PLC0413", # wrong-import-position
377-
# "PLC0415", # import-outside-toplevel
346+
"PLC0415", # import-outside-toplevel
378347
# "PLC1802", # use-implicit-booleaness-not-len
379348
# "PLC1803", # use-implicit-booleaness-not-comparison
380349
# "PLC1804", # use-implicit-booleaness-not-comparison-to-string
@@ -430,7 +399,7 @@ ignore = [
430399
# "PLW0102", # dangerous-default-value
431400
# "PLW0104", # pointless-statement
432401
# "PLW0106", # expression-not-assigned
433-
"PLW0108", # unnecessary-lambda
402+
"PLW0108", # unnecessary-lambda # # Autofix might not be correct
434403
# "PLW0123", # eval-used
435404
# "PLW0125", # using-constant-test
436405
# "PLW0143", # comparison-with-callable

0 commit comments

Comments
 (0)