From e4a4097c1465b443f9d32bdb1167b9c3384fb694 Mon Sep 17 00:00:00 2001 From: Iuri de Silvio Date: Tue, 9 Jul 2024 19:41:30 +0200 Subject: [PATCH] Replace `--show-source` with `--output-format` 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: