Ruff check is allowed to fail
All checks were successful
Run Python tests (through Pytest) / Test (push) Successful in 25s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 22s

This commit is contained in:
Jon Michael Aanes 2025-04-13 18:19:12 +02:00
parent 230a4fd65d
commit b4206ff41d

View File

@ -34,11 +34,11 @@ logger = logging.getLogger(__name__)
def bash_cmd(*commands: str) -> str:
commands = ('set -e', *commands)
return 'bash -c "' + ';'.join(commands) + '"'
AIDER_TEST = bash_cmd(
'set -e',
'virtualenv venv',
'source venv/bin/activate',
'pip install -e .',
@ -211,9 +211,9 @@ def has_commits_on_branch(cwd: Path, base_branch: str, current_branch: str) -> b
return False
def run_cmd(cmd: list[str], cwd: Path | None = None) -> None:
def run_cmd(cmd: list[str], cwd: Path | None = None, check=True) -> None:
print(cmd)
subprocess.run(cmd, check=True, cwd=cwd)
subprocess.run(cmd, check=check, cwd=cwd)
def solve_issue_in_repository(
@ -239,7 +239,7 @@ def solve_issue_in_repository(
run_cmd(create_aider_command(f'# {issue_title}\n{issue_description}'), tmpdirname)
# Auto-fix standard code quality stuff
run_cmd(['bash', '-c', RUFF_FORMAT_AND_AUTO_FIX], tmpdirname)
run_cmd(['bash', '-c', RUFF_FORMAT_AND_AUTO_FIX], tmpdirname, check=False)
run_cmd(['git', 'add', '.'], tmpdirname)
run_cmd(['git', 'commit', '-m', 'Ruff'], tmpdirname)