Skip to content

Commit 4dd98b8

Browse files
[pre-commit.ci] pre-commit autoupdate (#2687)
[pre-commit.ci] pre-commit autoupdate updates: github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.9.2 github.com/pre-commit/mirrors-mypy: v1.14.0 → v1.14.1 github.com/gitleaks/gitleaks: v8.22.1 → v8.23.1 github.com/python-jsonschema/check-jsonschema: 0.30.0 → 0.31.0 Reviewed-by: Matej Focko
2 parents 2dfec18 + dea253a commit 4dd98b8

32 files changed

+77
-111
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
repos:
66
- repo: https://github.com/astral-sh/ruff-pre-commit
7-
rev: v0.8.4
7+
rev: v0.9.2
88
hooks:
99
- id: ruff
1010
args: [--fix, --exit-non-zero-on-fix]
1111
- id: ruff-format
1212
- repo: https://github.com/pre-commit/mirrors-mypy
13-
rev: v1.14.0
13+
rev: v1.14.1
1414
hooks:
1515
- id: mypy
1616
args: [
@@ -96,14 +96,14 @@ repos:
9696
files: /tests_openshift.*\.yaml$
9797
stages: [manual, pre-push]
9898
- repo: https://github.com/gitleaks/gitleaks
99-
rev: v8.22.1
99+
rev: v8.23.1
100100
hooks:
101101
- id: gitleaks
102102
# The hook runs 'gitleaks protect --staged' which parses output of
103103
# 'git diff --staged', i.e. always passes in pre-push/manual stage.
104104
stages: [pre-commit]
105105
- repo: https://github.com/python-jsonschema/check-jsonschema
106-
rev: 0.30.0
106+
rev: 0.31.0
107107
hooks:
108108
- id: check-github-workflows
109109
args: ["--verbose"]

alembic/versions/a5c06aa9ef30_add_runmodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def upgrade():
397397
for test, build in zip(test_group, matching_builds):
398398
if len(build.runs) != 1:
399399
PackitException(
400-
f"Build {build} does not have exactly one run:\n" f"{build.runs}",
400+
f"Build {build} does not have exactly one run:\n{build.runs}",
401401
)
402402
test_runs_attached += 1
403403
build.runs[-1].test_run = test

alembic/versions/a619bd414ff0_add_build_status_enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def upgrade():
2525
"ALTER COLUMN status TYPE buildstatus USING status::buildstatus",
2626
)
2727
op.execute(
28-
"ALTER TABLE srpm_builds " "ALTER COLUMN status TYPE buildstatus USING status::buildstatus",
28+
"ALTER TABLE srpm_builds ALTER COLUMN status TYPE buildstatus USING status::buildstatus",
2929
)
3030

3131

alembic/versions/c6250555a36c_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ def upgrade():
548548

549549
status = copr_build.get("status")
550550
web_url = (
551-
f"https://copr.fedorainfracloud.org/coprs/{owner}/{project_name}/" f"build/{build_id}/"
551+
f"https://copr.fedorainfracloud.org/coprs/{owner}/{project_name}/build/{build_id}/"
552552
)
553553

554554
try:

packit_service/constants.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@
9090
NOTIFICATION_REPO = "https://github.com/packit/notifications"
9191

9292
PERMISSIONS_ERROR_WRITE_OR_ADMIN = (
93-
"Only users with write or admin permissions to the repository "
94-
"can trigger Packit-as-a-Service"
93+
"Only users with write or admin permissions to the repository can trigger Packit-as-a-Service"
9594
)
9695

9796
TASK_ACCEPTED = "The task was accepted."
@@ -137,7 +136,7 @@
137136

138137
CELERY_DEFAULT_MAIN_TASK_NAME = "task.steve_jobs.process_message"
139138

140-
MSG_TABLE_HEADER_WITH_DETAILS = "| Name/Job | URL |\n" "| --- | --- |\n"
139+
MSG_TABLE_HEADER_WITH_DETAILS = "| Name/Job | URL |\n| --- | --- |\n"
141140

142141
DEFAULT_MAPPING_TF = {
143142
"epel-6": "centos-6",

packit_service/models.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,7 @@ def get_by_id(cls, id_: int) -> Optional["AnityaMultipleVersionsModel"]:
546546
return session.query(AnityaVersionModel).filter_by(id=id_).first()
547547

548548
def __repr__(self):
549-
return (
550-
f"AnityaMultipleVersionsModel(" f"versions={self.versions}, " f"project={self.project})"
551-
)
549+
return f"AnityaMultipleVersionsModel(versions={self.versions}, project={self.project})"
552550

553551

554552
class AnityaVersionModel(BuildsAndTestsConnector, Base):
@@ -593,7 +591,7 @@ def get_by_id(cls, id_: int) -> Optional["AnityaVersionModel"]:
593591
return session.query(AnityaVersionModel).filter_by(id=id_).first()
594592

595593
def __repr__(self):
596-
return f"AnityaVersionModel(" f"version={self.version}, " f"project={self.project})"
594+
return f"AnityaVersionModel(version={self.version}, project={self.project})"
597595

598596

599597
class GitProjectModel(Base):
@@ -1487,7 +1485,7 @@ def get_by_id(cls, id_: int) -> Optional["ProjectReleaseModel"]:
14871485
return session.query(ProjectReleaseModel).filter_by(id=id_).first()
14881486

14891487
def __repr__(self):
1490-
return f"ProjectReleaseModel(" f"tag_name={self.tag_name}, " f"project={self.project})"
1488+
return f"ProjectReleaseModel(tag_name={self.tag_name}, project={self.project})"
14911489

14921490

14931491
class KojiBuildTagModel(BuildsAndTestsConnector, Base):
@@ -2330,8 +2328,7 @@ def get(
23302328

23312329
def __repr__(self):
23322330
return (
2333-
f"CoprBuildTargetModel(id={self.id}, "
2334-
f"build_submitted_time={self.build_submitted_time})"
2331+
f"CoprBuildTargetModel(id={self.id}, build_submitted_time={self.build_submitted_time})"
23352332
)
23362333

23372334
def add_scan(self, task_id: int) -> "OSHScanModel":
@@ -2789,8 +2786,7 @@ def get(
27892786

27902787
def __repr__(self):
27912788
return (
2792-
f"KojiBuildTargetModel(id={self.id}, "
2793-
f"build_submitted_time={self.build_submitted_time})"
2789+
f"KojiBuildTargetModel(id={self.id}, build_submitted_time={self.build_submitted_time})"
27942790
)
27952791

27962792
@classmethod

packit_service/worker/checker/distgit.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ def pre_check(self) -> bool:
200200
valid = True
201201
msg_to_report = None
202202
issue_title = (
203-
"Pull from upstream could not be run for update "
204-
f"{self.data.event_dict.get('version')}"
203+
f"Pull from upstream could not be run for update {self.data.event_dict.get('version')}"
205204
)
206205

207206
if self.package_config.upstream_project_url and not (

packit_service/worker/checker/forges.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ def pre_check(self) -> bool:
1616
"""
1717
if not (self.project.namespace == "packit" and self.project.repo == "notifications"):
1818
logger.debug(
19-
"Packit verification comment command not placed"
20-
"in packit/notifications repository.",
19+
"Packit verification comment command not placedin packit/notifications repository.",
2120
)
2221
return False
2322

packit_service/worker/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def discard_old_srpm_build_logs():
3333
ago = timedelta(days=int(outdated_after_days))
3434
for build in SRPMBuildModel.get_older_than(ago):
3535
logger.debug(
36-
f"SRPM build {build.id} is older than '{ago}'. " "Discarding log and artifact url.",
36+
f"SRPM build {build.id} is older than '{ago}'. Discarding log and artifact url.",
3737
)
3838
build.set_logs(None)
3939
build.set_url(None)

packit_service/worker/events/comment.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,7 @@ def _add_release_trigger(self):
271271

272272
if not release or release.git_tag.commit_sha != self.commit_sha:
273273
logger.debug(
274-
"Release with tag name from comment doesn't exist or doesn't match "
275-
"the commit SHA.",
274+
"Release with tag name from comment doesn't exist or doesn't match the commit SHA.",
276275
)
277276
return
278277

0 commit comments

Comments
 (0)