From 22a1ed6a2cfc62abd8290d4f88f3e3620f150326 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 22:21:01 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.0 → v0.8.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.0...v0.8.4) - [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.14.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.11.2...v1.14.0) - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/gitleaks/gitleaks: v8.18.4 → v8.22.1](https://github.com/gitleaks/gitleaks/compare/v8.18.4...v8.22.1) - [github.com/python-jsonschema/check-jsonschema: 0.29.2 → 0.30.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.29.2...0.30.0) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fcca591f1..deff0f987 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,13 +4,13 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.0 + rev: v0.8.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.14.0 hooks: - id: mypy args: [ @@ -41,7 +41,7 @@ repos: - id: prettier exclude: tests_openshift/openshift_integration/test_data/ - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -69,7 +69,7 @@ repos: - id: check-rebase args: - https://github.com/packit/packit-service.git - stages: [manual, push] + stages: [manual, pre-push] - repo: https://github.com/packit/requre rev: 0.8.4 hooks: @@ -94,16 +94,16 @@ repos: language: python types: [yaml] files: /tests_openshift.*\.yaml$ - stages: [manual, push] + stages: [manual, pre-push] - repo: https://github.com/gitleaks/gitleaks - rev: v8.18.4 + rev: v8.22.1 hooks: - id: gitleaks # The hook runs 'gitleaks protect --staged' which parses output of # 'git diff --staged', i.e. always passes in pre-push/manual stage. - stages: [commit] + stages: [pre-commit] - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.2 + rev: 0.30.0 hooks: - id: check-github-workflows args: ["--verbose"] From 09d718d9cc93757b3d062d6ad867a919434df73c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 22:21:34 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- packit_service/worker/events/comment.py | 6 ++---- .../worker/helpers/sync_release/sync_release.py | 10 ++++++---- tests/integration/test_bodhi_update.py | 3 +-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packit_service/worker/events/comment.py b/packit_service/worker/events/comment.py index aa03c5581..c09d00cf4 100644 --- a/packit_service/worker/events/comment.py +++ b/packit_service/worker/events/comment.py @@ -100,10 +100,8 @@ def build_targets_override(self) -> Optional[set[tuple[str, str]]]: # see that something has failed and only for those targets the # tests will be submitted. if ( - not self._build_targets_override - and "rebuild-failed" in self.comment - or "retest-failed" in self.comment - ): + not self._build_targets_override and "rebuild-failed" in self.comment + ) or "retest-failed" in self.comment: self._build_targets_override = ( super().get_all_build_targets_by_status( statuses_to_filter_with=[BuildStatus.failure], diff --git a/packit_service/worker/helpers/sync_release/sync_release.py b/packit_service/worker/helpers/sync_release/sync_release.py index bc30481c3..6ee4c845a 100644 --- a/packit_service/worker/helpers/sync_release/sync_release.py +++ b/packit_service/worker/helpers/sync_release/sync_release.py @@ -108,10 +108,12 @@ def job(self) -> Optional[JobConfig]: self._db_project_object.job_config_trigger_type == job.trigger # pull-from-upstream can be retriggered by a dist-git PR comment, # in which case the trigger types don't match - or job.type == JobType.pull_from_upstream - and self._db_project_object.job_config_trigger_type - == JobConfigTriggerType.pull_request - and job.trigger == JobConfigTriggerType.release + or ( + job.type == JobType.pull_from_upstream + and self._db_project_object.job_config_trigger_type + == JobConfigTriggerType.pull_request + and job.trigger == JobConfigTriggerType.release + ) ) ): self._job = job diff --git a/tests/integration/test_bodhi_update.py b/tests/integration/test_bodhi_update.py index a7abe29cd..a0110d940 100644 --- a/tests/integration/test_bodhi_update.py +++ b/tests/integration/test_bodhi_update.py @@ -1148,8 +1148,7 @@ def _create_update(dist_git_branch, update_type, koji_builds, sidetag, alias): 0 if missing_dependency or non_unique_builds - or existing_update - and " " in existing_update.koji_nvrs + or (existing_update and " " in existing_update.koji_nvrs) else 1 ), )