You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The popmon ruff configuration works with nbqa for notebooks, and has selected rules for tests, sphinx config and examples.
Some checks are disabled, but would benefit from manual refactoring.
There is also a set of rules that can be mechanically refactored, for violations that occur more often. Here autofix would be a great improvement over manual refactor:
# Prefer autofix
"PD011", # [1] .to_numpy() instead of values
"PD003", # [1]`.isna` is preferred to `.isnull`; functionality is equivalent
"PT018", # [2] Assertion should be broken down into multiple parts
"RET504", # [3] Unnecessary variable assignment before `return` statement
"RET506", # Unnecessary `else` after `raise` statement
"PTH123", # [4] `open("foo")` should be replaced by `Path("foo").open()`
"PTH120", # [4] similar to above
"RET505", # Unnecessary `else` after `return` statement
"SIM102", # (when comments are in the statement) Use a single `if` statement instead of nested `if` statements
"SIM114", # (when comments are in the statement) Combine `if` branches using logical `or` operator
"G004", # Logging statement uses f-string
A couple of them are already in progress. Related autofix PRs:
\cc @charliermarsh in case you are interested. Thanks a lot for all your work on ruff :) I'm considering adding the remaining autofixes too if that is appreciated.
The text was updated successfully, but these errors were encountered:
Run
ruff
and resolve any issues foundThe popmon ruff configuration works with
nbqa
for notebooks, and has selected rules for tests, sphinx config and examples.Some checks are disabled, but would benefit from manual refactoring.
There is also a set of rules that can be mechanically refactored, for violations that occur more often. Here autofix would be a great improvement over manual refactor:
A couple of them are already in progress. Related autofix PRs:
pandas-vet
] autofixes for PD003, PD004, PD008, PD009 and PD011 astral-sh/ruff#2741flake8-pytest-style
] autofix for composite-assertion (PT018) astral-sh/ruff#2732flake8-use-pathlib
] autofix and new rules astral-sh/ruff#2348\cc @charliermarsh in case you are interested. Thanks a lot for all your work on
ruff
:) I'm considering adding the remaining autofixes too if that is appreciated.The text was updated successfully, but these errors were encountered: