Skip to content

Commit

Permalink
Fixed deprecation of ruff <path> (#840)
Browse files Browse the repository at this point in the history
Ruff 0.3.0 deprecated the usage of ruff <path> in favor of
ruff check <path>:
https://github.com/astral-sh/ruff/releases/tag/v0.3.0

This commit fixes this with making nbqa ruff call ruff check instead of ruff.
  • Loading branch information
funkeleinhorn authored Mar 3, 2024
1 parent 586c5bc commit 2303a49
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nbqa/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ def _run_command( # pylint: disable=too-many-locals
if main_command == "mypy" and "MYPY_FORCE_COLOR" not in my_env:
my_env["MYPY_FORCE_COLOR"] = "1"

if main_command == "ruff":
sub_commands.insert(0, "check")

if shell:
# We already checked that which does not return None

Expand Down

0 comments on commit 2303a49

Please sign in to comment.