Skip to content

Commit

Permalink
Clean up pylint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tqa236 committed Feb 7, 2024
1 parent e73307f commit 1a244f5
Showing 1 changed file with 14 additions and 35 deletions.
49 changes: 14 additions & 35 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -318,47 +318,26 @@ ignore = [
"RUF007",
# mutable-class-default
"RUF012",
# Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
# "E721",
# Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
"RUF021",
# `__all__` is not sorted
"RUF022",
# Use a `set` literal when testing for membership
"PLR6201",

# Additional pylint rules
# literal-membership
"PLR6201", # 847 errors
# Method could be a function, class method, or static method
"PLR6301",
"PLR6301", # 11411 errors
# Too many positional arguments (6/5)
"PLR0917",
# `import` should be at the top-level of a file
"PLC0415",
# Too many public methods (23 > 20)
"PLR0904",
# Too many local variables
"PLR0914",
# Too many nested blocks (6 > 5)
"PLR1702",
# Too many Boolean expressions
"PLR0916",
"PLR0917", # 470 errors
# Private name import
"PLC2701",
# Redefining argument with the local name
"PLR1704",
# Unnecessary dunder call
"PLC2801",
# Lambda may be unnecessary; consider inlining inner function
# Autofix might not be correct
"PLW0108",
"PLC2701", # 27 errors
# Object does not implement `__hash__` method
"PLW1641",
"PLW1641", # 16 errors
# `tempfile.NamedTemporaryFile` in text mode without explicit `encoding` argument
"PLW1514",
"PLW1514", # 1 error
# Bad or misspelled dunder method name
"PLW3201",
"PLW3201", # 69 errors, seems to be all false positive
# Unnecessary lookup of dictionary value by key
"PLR1733",
"PLR1733", # 5 errors, it seems like we wannt to ignore these
# Unnecessary lookup of list item by index
"PLR1736",
"PLR1736", # 4 errors, we're currently having inline pylint ignore

# Output of pylint-to-ruff
# "PLC0103", # invalid-name
Expand All @@ -374,7 +353,7 @@ ignore = [
# "PLC0411", # wrong-import-order
# "PLC0412", # ungrouped-imports
# "PLC0413", # wrong-import-position
# "PLC0415", # import-outside-toplevel
"PLC0415", # import-outside-toplevel
# "PLC1802", # use-implicit-booleaness-not-len
# "PLC1803", # use-implicit-booleaness-not-comparison
# "PLC1804", # use-implicit-booleaness-not-comparison-to-string
Expand Down Expand Up @@ -430,7 +409,7 @@ ignore = [
# "PLW0102", # dangerous-default-value
# "PLW0104", # pointless-statement
# "PLW0106", # expression-not-assigned
"PLW0108", # unnecessary-lambda
"PLW0108", # unnecessary-lambda # # Autofix might not be correct
# "PLW0123", # eval-used
# "PLW0125", # using-constant-test
# "PLW0143", # comparison-with-callable
Expand Down

0 comments on commit 1a244f5

Please sign in to comment.