From fd4c1e9ff2097f0b822d62978432e88adb4ffab5 Mon Sep 17 00:00:00 2001 From: Iuri de Silvio Date: Tue, 9 Jul 2024 21:19:31 +0200 Subject: [PATCH] Replace `--show-source` with `--output-format` (#24) See https://github.com/astral-sh/ruff/blob/6fa4e32ad318afbec4c6997c69731bb4c256ef82/CHANGELOG.md?plain=1#L125 --- pytest_ruff/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pytest_ruff/__init__.py b/pytest_ruff/__init__.py index 031928a..8ea9826 100644 --- a/pytest_ruff/__init__.py +++ b/pytest_ruff/__init__.py @@ -86,7 +86,14 @@ def collect(self): def check_file(path): ruff = find_ruff_bin() - command = [ruff, "check", path, "--quiet", "--show-source", "--force-exclude"] + command = [ + ruff, + "check", + path, + "--quiet", + "--output-format=full", + "--force-exclude", + ] child = Popen(command, stdout=PIPE, stderr=PIPE) stdout, _ = child.communicate() if stdout: