Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#205)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.7.0 → v0.7.1](astral-sh/ruff-pre-commit@v0.7.0...v0.7.1)
- [github.com/gitleaks/gitleaks: v8.21.1 → v8.21.2](gitleaks/gitleaks@v8.21.1...v8.21.2)
- [github.com/pre-commit/mirrors-mypy: v1.12.1 → v1.13.0](pre-commit/mirrors-mypy@v1.12.1...v1.13.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Meni Yakove <441263+myakove@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] and myakove authored Oct 29, 2024
1 parent ef17c6b commit b4f57a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ repos:
- id: detect-secrets

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.7.1
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.1
rev: v8.21.2
hooks:
- id: gitleaks

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.12.1
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies: [types-croniter, types-PyYAML, types-requests]
5 changes: 2 additions & 3 deletions ci_jobs_trigger/libs/openshift_ci/re_trigger/job_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ def __enter__(self):
self.connection = sqlite3.connect(self.db_path)
self.cursor = self.connection.cursor()
self.cursor.execute(
f"CREATE TABLE if not exists {self.table_name}("
f"{self.job_name_column} TEXT, {self.prow_job_id_column} TEXT)"
f"CREATE TABLE if not exists {self.table_name}({self.job_name_column} TEXT, {self.prow_job_id_column} TEXT)"
)

return self
Expand All @@ -42,7 +41,7 @@ def check_prow_job_id_in_db(self, job_name, prow_job_id):
def write(self, job_name, prow_job_id):
def _insert_to_db(_job_name, _prow_job_id):
self.cursor.execute(
f"INSERT INTO {self.table_name} " f"(job_name, prow_job_id) VALUES ('{_job_name}', '{_prow_job_id}')"
f"INSERT INTO {self.table_name} (job_name, prow_job_id) VALUES ('{_job_name}', '{_prow_job_id}')"
)

for _ in TimeoutSampler(
Expand Down
6 changes: 3 additions & 3 deletions ci_jobs_trigger/tests/job_retriggering/test_job_triggering.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def test_failed_job_in_pre_phase(junit_file, job_triggering):
)
def test_failed_job_in_tests_phase(junit_file, job_triggering):
tests_dict = job_triggering.get_testsuites_testcase_from_junit_operator(junit_xml=junit_file)
assert not job_triggering.is_build_failed_on_setup(
tests_dict=tests_dict
), "Job should fail on test phase but did not"
assert not job_triggering.is_build_failed_on_setup(tests_dict=tests_dict), (
"Job should fail on test phase but did not"
)


class TestJobTriggering:
Expand Down

0 comments on commit b4f57a0

Please sign in to comment.