Ruff after aider
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 23s

This commit is contained in:
Jon Michael Aanes 2025-04-21 16:19:04 +02:00
parent f253235841
commit e56463d207
2 changed files with 8 additions and 4 deletions

View File

@ -539,6 +539,7 @@ def solve_issues_in_repository(
issue_number, issue_number,
) )
def handle_pr_comments( def handle_pr_comments(
repository_config, repository_config,
pr_number, pr_number,
@ -567,15 +568,15 @@ def handle_pr_comments(
context = '' context = ''
body = comment.get('body', '') body = comment.get('body', '')
issue = ( issue = (
f"Resolve the following reviewer comment:\n{body}\n\n" f'Resolve the following reviewer comment:\n{body}\n\n'
f"File: {path}\n\nContext:\n{context}" f'File: {path}\n\nContext:\n{context}'
) )
# invoke aider on the comment context # invoke aider on the comment context
issue_solution_round(repository_path, issue) issue_solution_round(repository_path, issue)
# commit and push changes for this comment # commit and push changes for this comment
run_cmd(['git', 'add', path], repository_path, check=False) run_cmd(['git', 'add', path], repository_path, check=False)
run_cmd( run_cmd(
['git', 'commit', '-m', f"Resolve comment {comment.get('id')}"], ['git', 'commit', '-m', f'Resolve comment {comment.get("id")}'],
repository_path, repository_path,
check=False, check=False,
) )

View File

@ -170,7 +170,10 @@ class GiteaClient:
return response.json() return response.json()
def get_pull_request_comments( def get_pull_request_comments(
self, owner: str, repo: str, pr_number: str, self,
owner: str,
repo: str,
pr_number: str,
) -> list[dict]: ) -> list[dict]:
""" """
Fetch comments for a pull request. Fetch comments for a pull request.