From 818635269057683321faf0aaa931d171c8dfd4c9 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Mon, 21 Apr 2025 11:00:38 +0200 Subject: [PATCH] Initial ruff pass --- aider_gitea/__init__.py | 12 +++++++++--- test/test_has_commits_on_branch.py | 8 ++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/aider_gitea/__init__.py b/aider_gitea/__init__.py index ae5ea5d..1c35b2b 100644 --- a/aider_gitea/__init__.py +++ b/aider_gitea/__init__.py @@ -240,7 +240,9 @@ def push_changes( # Get commit messages for PR description commit_messages = get_commit_messages( - cwd, repository_config.base_branch, branch_name, + cwd, + repository_config.base_branch, + branch_name, ) description = f'This pull request resolves #{issue_number}\n\n' @@ -266,7 +268,9 @@ def push_changes( # Extract PR number and URL if available return IssueResolution( - True, str(pr_response.get('number')), pr_response.get('html_url'), + True, + str(pr_response.get('number')), + pr_response.get('html_url'), ) @@ -388,7 +392,9 @@ def solve_issue_in_repository( def solve_issues_in_repository( - repository_config: RepositoryConfig, client, seen_issues_db, + repository_config: RepositoryConfig, + client, + seen_issues_db, ): """Process all open issues with the 'aider' label. diff --git a/test/test_has_commits_on_branch.py b/test/test_has_commits_on_branch.py index 4affe9e..fd3f873 100644 --- a/test/test_has_commits_on_branch.py +++ b/test/test_has_commits_on_branch.py @@ -23,7 +23,9 @@ class TestHasCommitsOnBranch: # Verify get_commit_messages was called with correct arguments mock_get_commit_messages.assert_called_once_with( - self.cwd, self.base_branch, self.current_branch, + self.cwd, + self.base_branch, + self.current_branch, ) @patch('aider_gitea.get_commit_messages') @@ -39,7 +41,9 @@ class TestHasCommitsOnBranch: # Verify get_commit_messages was called with correct arguments mock_get_commit_messages.assert_called_once_with( - self.cwd, self.base_branch, self.current_branch, + self.cwd, + self.base_branch, + self.current_branch, ) @patch('aider_gitea.get_commit_messages')