Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8ccc705

Browse files
committedFeb 7, 2024·
Clean up pylint rules
1 parent 07edd34 commit 8ccc705

File tree

1 file changed

+14
-35
lines changed

1 file changed

+14
-35
lines changed
 

‎pyproject.toml

+14-35
Original file line numberDiff line numberDiff line change
@@ -319,47 +319,26 @@ ignore = [
319319
"RUF007",
320320
# mutable-class-default
321321
"RUF012",
322-
# Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
323-
# "E721",
324-
# Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
325-
"RUF021",
326-
# `__all__` is not sorted
327-
"RUF022",
328-
# Use a `set` literal when testing for membership
329-
"PLR6201",
322+
323+
# Additional pylint rules
324+
# literal-membership
325+
"PLR6201", # 847 errors
330326
# Method could be a function, class method, or static method
331-
"PLR6301",
327+
"PLR6301", # 11411 errors
332328
# Too many positional arguments (6/5)
333-
"PLR0917",
334-
# `import` should be at the top-level of a file
335-
"PLC0415",
336-
# Too many public methods (23 > 20)
337-
"PLR0904",
338-
# Too many local variables
339-
"PLR0914",
340-
# Too many nested blocks (6 > 5)
341-
"PLR1702",
342-
# Too many Boolean expressions
343-
"PLR0916",
329+
"PLR0917", # 470 errors
344330
# Private name import
345-
"PLC2701",
346-
# Redefining argument with the local name
347-
"PLR1704",
348-
# Unnecessary dunder call
349-
"PLC2801",
350-
# Lambda may be unnecessary; consider inlining inner function
351-
# Autofix might not be correct
352-
"PLW0108",
331+
"PLC2701", # 27 errors
353332
# Object does not implement `__hash__` method
354-
"PLW1641",
333+
"PLW1641", # 16 errors
355334
# `tempfile.NamedTemporaryFile` in text mode without explicit `encoding` argument
356-
"PLW1514",
335+
"PLW1514", # 1 error
357336
# Bad or misspelled dunder method name
358-
"PLW3201",
337+
"PLW3201", # 69 errors, seems to be all false positive
359338
# Unnecessary lookup of dictionary value by key
360-
"PLR1733",
339+
"PLR1733", # 5 errors, it seems like we wannt to ignore these
361340
# Unnecessary lookup of list item by index
362-
"PLR1736",
341+
"PLR1736", # 4 errors, we're currently having inline pylint ignore
363342

364343
# Output of pylint-to-ruff
365344
# "PLC0103", # invalid-name
@@ -375,7 +354,7 @@ ignore = [
375354
# "PLC0411", # wrong-import-order
376355
# "PLC0412", # ungrouped-imports
377356
# "PLC0413", # wrong-import-position
378-
# "PLC0415", # import-outside-toplevel
357+
"PLC0415", # import-outside-toplevel
379358
# "PLC1802", # use-implicit-booleaness-not-len
380359
# "PLC1803", # use-implicit-booleaness-not-comparison
381360
# "PLC1804", # use-implicit-booleaness-not-comparison-to-string
@@ -431,7 +410,7 @@ ignore = [
431410
# "PLW0102", # dangerous-default-value
432411
# "PLW0104", # pointless-statement
433412
# "PLW0106", # expression-not-assigned
434-
"PLW0108", # unnecessary-lambda
413+
"PLW0108", # unnecessary-lambda # # Autofix might not be correct
435414
# "PLW0123", # eval-used
436415
# "PLW0125", # using-constant-test
437416
# "PLW0143", # comparison-with-callable

0 commit comments

Comments
 (0)
Please sign in to comment.