From 623ab1e1da4c71a4e4286792a668b2724d92f93b Mon Sep 17 00:00:00 2001 From: "bscriver123 (aider)" Date: Wed, 11 Dec 2024 19:05:47 +0000 Subject: [PATCH] fix: Add --fix option to ruff check for automatic import sorting fixes --- pytest_examples/lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_examples/lint.py b/pytest_examples/lint.py index cec01cb..ccd13cc 100644 --- a/pytest_examples/lint.py +++ b/pytest_examples/lint.py @@ -49,7 +49,7 @@ def ruff_check( extra_ruff_args: tuple[str, ...] = (), ) -> str: ruff = find_ruff_bin() - args = ruff, 'check', '-', *config.ruff_config(), *extra_ruff_args + args = ruff, 'check', '--fix', '-', *config.ruff_config(), *extra_ruff_args p = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, universal_newlines=True) stdout, stderr = p.communicate(example.source, timeout=10)