Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,33 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
rev: v6.0.0
hooks:
- id: check-ast
- id: trailing-whitespace
- id: check-toml
- id: end-of-file-fixer

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.1.0
rev: v4.0.0
hooks:
- id: add-trailing-comma

- repo: https://github.com/crate-ci/typos
rev: v1.38.1
hooks:
- id: typos

- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: [
'--exclude-files', 'pnpm-lock.yaml',
'--exclude-files', 'docs/README.md',
'--exclude-lines', 'amqp://guest:guest@localhost:5672',
]

- repo: local
hooks:
- id: black
Expand Down
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pytest = "^7.1.2"
ruff = "^0"
black = { version = "^22.6.0", allow-prereleases = true }
mypy = "^1"
pre-commit = "^2.20.0"
pre-commit = "^4.3.0"
coverage = "^6.4.2"
pytest-cov = "^3.0.0"
mock = "^4.0.3"
Expand Down Expand Up @@ -185,3 +185,8 @@ allow-magic-value-types = ["int", "str", "float"]

[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = ["taskiq_dependencies.Depends", "taskiq.TaskiqDepends"]

[tool.typos.files]
extend-exclude = [
"docs/README.md", # because of identifier in head section
]
2 changes: 1 addition & 1 deletion taskiq/cli/scheduler/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def get_task_delay(task: ScheduledTask) -> Optional[int]:
# If it's timedelta, we simply add the delta to current time.
if task.cron_offset and isinstance(task.cron_offset, timedelta):
now += task.cron_offset
# If timezone was specified as string we convert it timzone
# If timezone was specified as string we convert it timezone
# offset and then apply.
elif task.cron_offset and isinstance(task.cron_offset, str):
now = now.astimezone(pytz.timezone(task.cron_offset))
Expand Down