From 2303a49df1a15d73fdbd525f41e37c3b3f82fcf8 Mon Sep 17 00:00:00 2001 From: Sydney Date: Sun, 3 Mar 2024 18:35:11 +0100 Subject: [PATCH] Fixed deprecation of ruff (#840) Ruff 0.3.0 deprecated the usage of ruff in favor of ruff check : 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. --- nbqa/__main__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nbqa/__main__.py b/nbqa/__main__.py index 1d9df95f..81fd63da 100644 --- a/nbqa/__main__.py +++ b/nbqa/__main__.py @@ -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