Skip to content

Commit 5cec89f

Browse files
[pre-commit.ci] pre-commit autoupdate (#998)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.14 → v0.15.1](astral-sh/ruff-pre-commit@v0.14.14...v0.15.1) - [github.com/tox-dev/pyproject-fmt: v2.12.1 → v2.16.0](tox-dev/pyproject-fmt@v2.12.1...v2.16.0) - [github.com/abravalheri/validate-pyproject: v0.24.1 → v0.25](abravalheri/validate-pyproject@v0.24.1...v0.25) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix timestamp comparison logic in schedulers.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
1 parent 5ca807e commit 5cec89f

3 files changed

Lines changed: 17 additions & 19 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ repos:
3333
args: [--target-version, "3.2"]
3434

3535
- repo: https://github.com/astral-sh/ruff-pre-commit
36-
rev: v0.14.14
36+
rev: v0.15.1
3737
hooks:
3838
- id: ruff-check
3939
# - id: ruff-format
4040

4141
- repo: https://github.com/tox-dev/pyproject-fmt
42-
rev: v2.12.1
42+
rev: v2.16.0
4343
hooks:
4444
- id: pyproject-fmt
4545

4646
- repo: https://github.com/abravalheri/validate-pyproject
47-
rev: v0.24.1
47+
rev: v0.25
4848
hooks:
4949
- id: validate-pyproject

django_celery_beat/schedulers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def schedule_changed(self):
430430
return False
431431

432432
try:
433-
if ts and ts > (last if last else ts):
433+
if ts and ts > (last or ts):
434434
return True
435435
finally:
436436
self._last_timestamp = ts

pyproject.toml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[tool.ruff]
22
target-version = "py38"
3-
43
lint.select = [
54
"A", # flake8-builtins
65
"AIR", # Airflow
@@ -126,25 +125,24 @@ lint.pylint.allow-magic-value-types = [
126125
"int",
127126
"str",
128127
]
129-
lint.pylint.max-args = 8 # Default: 5
128+
lint.pylint.max-args = 8 # Default: 5
130129

131-
[tool.coverage.report]
132-
exclude_lines = [
133-
"pragma: no cover",
134-
"if TYPE_CHECKING:",
130+
[tool.coverage]
131+
run.branch = true
132+
run.cover_pylib = false
133+
run.include = [ "*django_celery_beat/*" ]
134+
run.omit = [ "django_celery_beat.tests.*" ]
135+
report.exclude_lines = [
135136
"except ImportError:",
137+
"if TYPE_CHECKING:",
138+
"pragma: no cover",
136139
]
137-
omit = [
138-
"*/python?.?/*",
139-
"*/site-packages/*",
140-
"*/pypy/*",
140+
report.omit = [
141141
"*/.tox/*",
142142
"*/docker/*",
143143
"*/docs/*",
144+
"*/pypy/*",
145+
"*/python?.?/*",
146+
"*/site-packages/*",
144147
"*/test_*.py",
145148
]
146-
[tool.coverage.run]
147-
branch = true
148-
cover_pylib = false
149-
include = [ "*django_celery_beat/*" ]
150-
omit = [ "django_celery_beat.tests.*" ]

0 commit comments

Comments
 (0)