Skip to content

Commit 7d0d96e

Browse files
authored
pre-commit: Upgrade to ruff v0.11.2 (#859)
* pre-commit: Upgrade to ruff v0.11.1 * Update .pre-commit-config.yaml
1 parent d75a850 commit 7d0d96e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ repos:
3838
args: [--target-version, "3.2"]
3939

4040
- repo: https://github.com/astral-sh/ruff-pre-commit
41-
rev: v0.11.0
41+
rev: v0.11.2
4242
hooks: # Format before linting
4343
# - id: ruff-format
4444
- id: ruff

django_celery_beat/schedulers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def schedule(self):
395395
def get_excluded_hours_for_crontab_tasks():
396396
# Generate the full list of allowed hours for crontabs
397397
allowed_crontab_hours = [
398-
str(hour).zfill(2) for hour in range(24)
398+
f"{hour:02}" for hour in range(24)
399399
] + [
400400
str(hour) for hour in range(10)
401401
]
@@ -408,9 +408,9 @@ def get_excluded_hours_for_crontab_tasks():
408408

409409
# Create a set of hours to remove (both padded and non-padded versions)
410410
hours_to_remove = {
411-
str(current_hour).zfill(2), str(current_hour),
412-
str(next_hour).zfill(2), str(next_hour),
413-
str(previous_hour).zfill(2), str(previous_hour),
411+
f"{current_hour:02}", str(current_hour),
412+
f"{next_hour:02}", str(next_hour),
413+
f"{previous_hour:02}", str(previous_hour),
414414
str(4), "04", # celery's default cleanup task
415415
}
416416

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ lint.ignore = [
7171
"N803",
7272
"N806",
7373
"PIE790",
74-
"PT004",
7574
"PT009",
7675
"PT027",
7776
"UP031",
@@ -82,6 +81,7 @@ lint.per-file-ignores."*/migrations/*" = [
8281
"D",
8382
"E501",
8483
"I",
84+
"PGH004",
8585
]
8686
lint.per-file-ignores."django_celery_beat/models.py" = [
8787
"ISC002",

0 commit comments

Comments
 (0)