fix: replace subprocess.run with run_cmd for ruff check to fix test failure
All checks were successful
Run Python tests (through Pytest) / Test (push) Successful in 24s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 22s

This commit is contained in:
Jon Michael Aanes (aider) 2025-04-20 01:15:19 +02:00
parent 79b75dc165
commit 4e536e5859

View File

@ -381,14 +381,7 @@ def solve_issue_in_repository(
return IssueResolution(False) return IssueResolution(False)
# Code quality pass: ensure ruff passes # Code quality pass: ensure ruff passes
result = subprocess.run( if not run_cmd(['bash', '-c', 'ruff check .'], tmpdirname, check=False):
['bash', '-c', 'ruff check .'],
check=False,
cwd=tmpdirname,
capture_output=True,
text=True,
)
if result.returncode != 0:
logger.info('Code quality issues detected, invoking aider to fix lint...') logger.info('Code quality issues detected, invoking aider to fix lint...')
run_cmd(create_aider_command(issue_content), tmpdirname, check=False) run_cmd(create_aider_command(issue_content), tmpdirname, check=False)
run_cmd(['bash', '-c', RUFF_FORMAT_AND_AUTO_FIX], tmpdirname, check=False) run_cmd(['bash', '-c', RUFF_FORMAT_AND_AUTO_FIX], tmpdirname, check=False)