aider-chat: fix aider-chat's flake8 lint invocation for python (#411827)

This commit is contained in:
dotlambda
2025-05-29 11:55:36 -07:00
committed by GitHub
2 changed files with 19 additions and 3 deletions
@@ -3,6 +3,7 @@
stdenv,
buildPythonPackage,
fetchFromGitHub,
replaceVars,
gitMinimal,
portaudio,
playwright-driver,
@@ -254,9 +255,11 @@ let
gitMinimal
];
postPatch = ''
substituteInPlace aider/linter.py --replace-fail "\"flake8\"" "\"${flake8}\""
'';
patches = [
(replaceVars ./fix-flake8-invoke.patch {
flake8 = lib.getExe flake8;
})
];
disabledTestPaths = [
# Tests require network access
@@ -0,0 +1,13 @@
--- a/aider/linter.py 2025-05-28 17:12:07.177786621 +0000
+++ b/aider/linter.py 2025-05-28 17:12:45.834897524 +0000
@@ -136,9 +136,7 @@
def flake8_lint(self, rel_fname):
fatal = "E9,F821,F823,F831,F406,F407,F701,F702,F704,F706"
flake8_cmd = [
- sys.executable,
- "-m",
- "flake8",
+ "@flake8@",
f"--select={fatal}",
"--show-source",
"--isolated",