Skip to content

Commit

Permalink
Enable the entire PLW category in Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Oct 18, 2024
1 parent 31e0312 commit 74e7eb2
Showing 1 changed file with 9 additions and 26 deletions.
35 changes: 9 additions & 26 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ ignore = [
"PLR6104", # Use `{operator}` to perform an augmented assignment directly
"PLR6201", # Use a set literal when testing for membership
"PLR6301", # Method `{method_name}` could be a function, class method, or static method
# pylint ('PLW')
"PLW0108", # Lambda may be unnecessary; consider inlining inner function
"PLW0211", # First argument of a static method should not be named `{argument_name}`
"PLW0603", # Using the global statement to update `{name}` is discouraged
"PLW1514", # `{function_name}` in text mode without explicit `encoding` argument
"PLW1641", # Object does not implement `__hash__` method
"PLW2901", # Outer {outer_kind} variable `{name}` overwritten by inner {inner_kind} target
"PLW3201", # Dunder method `{name}` has no special meaning in Python 3
# flake8-simplify
"SIM102", # Use a single `if` statement instead of nested `if` statements
"SIM108", # Use ternary operator `{contents}` instead of `if`-`else`-block
Expand Down Expand Up @@ -200,32 +208,7 @@ select = [
# pylint ('PLR')
"PLR",
# pylint ('PLW')
# "PLW0108", # Lambda may be unnecessary; consider inlining inner function
"PLW0120", # `else` clause on loop without a `break` statement; remove the `else` and dedent its contents
"PLW0127", # Self-assignment of variable `{name}`
"PLW0128", # Redeclared variable `{name}` in assignment
"PLW0129", # Asserting on an empty string literal will never pass
"PLW0131", # Named expression used without context
"PLW0133", # Missing `raise` statement on exception
"PLW0177", # Comparing against a NaN value; use `math.isnan` instead
# "PLW0211", # First argument of a static method should not be named `{argument_name}`
"PLW0245", # `super` call is missing parentheses
"PLW0406", # Module `{name}` imports itself
"PLW0602", # Using global for `{name}` but no assignment is done
# "PLW0603", # Using the global statement to update `{name}` is discouraged
"PLW0604", # `global` at module level is redundant
"PLW0642", # Reassigned `{}` variable in {method_type} method
"PLW0711", # Exception to catch is the result of a binary `and` operation
"PLW1501", # `{mode}` is not a valid mode for `open`
"PLW1508", # Invalid type for environment variable default; expected `str` or `None`
"PLW1509", # `preexec_fn` argument is unsafe when using threads
"PLW1510", # `subprocess.run` without explicit `check` argument
# "PLW1514", # `{function_name}` in text mode without explicit `encoding` argument
# "PLW1641", # Object does not implement `__hash__` method
"PLW2101", # Threading lock directly created in `with` statement has no effect
# "PLW2901", # Outer {outer_kind} variable `{name}` overwritten by inner {inner_kind} target
# "PLW3201", # Dunder method `{name}` has no special meaning in Python 3
"PLW3301", # Nested `{func}` calls can be flattened
"PLW",
# flake8-pytest-style ('PT')
"PT",
# flake8-use-pathlib ('PTH')
Expand Down

0 comments on commit 74e7eb2

Please sign in to comment.