From bff022b806b5a5877fe28dd376678350e320b838 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Wed, 23 Apr 2025 08:59:27 +0200 Subject: [PATCH] Ruff after aider --- aider_gitea/__init__.py | 5 ++++- aider_gitea/gitea_client.py | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/aider_gitea/__init__.py b/aider_gitea/__init__.py index 415b05b..0e6bd4a 100644 --- a/aider_gitea/__init__.py +++ b/aider_gitea/__init__.py @@ -591,6 +591,7 @@ def handle_pr_comments( ) run_cmd(['git', 'push', 'origin', branch_name], repository_path, check=False) + def handle_failing_pipelines( repository_config: RepositoryConfig, pr_number: str, @@ -623,4 +624,6 @@ def handle_failing_pipelines( repository_path, check=False, ) - run_cmd(['git', 'push', 'origin', branch_name], repository_path, check=False) + run_cmd( + ['git', 'push', 'origin', branch_name], repository_path, check=False, + ) diff --git a/aider_gitea/gitea_client.py b/aider_gitea/gitea_client.py index 9db37ef..9968845 100644 --- a/aider_gitea/gitea_client.py +++ b/aider_gitea/gitea_client.py @@ -174,12 +174,15 @@ class GiteaClient: url = f'{self.gitea_url}/repos/{owner}/{repo}/actions/runs' response = self.session.get(url) response.raise_for_status() - runs = response.json().get("workflow_runs", []) + runs = response.json().get('workflow_runs', []) failed = [] for run in runs: - if any(pr.get("number") == int(pr_number) for pr in run.get("pull_requests", [])): - if run.get("conclusion") not in ("success",): - failed.append(run.get("id")) + if any( + pr.get('number') == int(pr_number) + for pr in run.get('pull_requests', []) + ): + if run.get('conclusion') not in ('success',): + failed.append(run.get('id')) return failed def get_pipeline_log(self, owner: str, repo: str, run_id: int) -> str: