From 901d8a1a2a47cc8660adf6d5531333bf5b256c97 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 18 May 2024 19:14:19 -0700 Subject: [PATCH] Set linter command as a string and update the result message format. --- aider/linter.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/aider/linter.py b/aider/linter.py index ae7da0253..fd0b130b1 100644 --- a/aider/linter.py +++ b/aider/linter.py @@ -24,7 +24,7 @@ class Linter: self.languages = dict( # python=self.py_lint, - python="pre-commit run --files" + python="/Users/gauthier/Projects/aider/tmp.sh" ) def set_linter(self, lang, cmd): @@ -46,11 +46,8 @@ class Linter: except subprocess.CalledProcessError as err: errors = err.output.decode() # non-zero exit status - res = f"# Running: {cmd}\n" - res += "If the output below indicates errors or problems, fix them.\n" - res += ( - "But if the command says it fixed all the issues itself, don't take further action.\n\n" - ) + cmd = " ".join(cmd) + res = f"# Running: {cmd}\n\n" res += errors return res