Skip to content

Commit b588dc6

Browse files
authored
chore: fix typo and add hooks to prevent it in future (#521)
1 parent 4a0960c commit b588dc6

File tree

4 files changed

+30
-10
lines changed

4 files changed

+30
-10
lines changed

.pre-commit-config.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,33 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v2.4.0
5+
rev: v6.0.0
66
hooks:
77
- id: check-ast
88
- id: trailing-whitespace
99
- id: check-toml
1010
- id: end-of-file-fixer
1111

1212
- repo: https://github.com/asottile/add-trailing-comma
13-
rev: v2.1.0
13+
rev: v4.0.0
1414
hooks:
1515
- id: add-trailing-comma
1616

17+
- repo: https://github.com/crate-ci/typos
18+
rev: v1.38.1
19+
hooks:
20+
- id: typos
21+
22+
- repo: https://github.com/Yelp/detect-secrets
23+
rev: v1.5.0
24+
hooks:
25+
- id: detect-secrets
26+
args: [
27+
'--exclude-files', 'pnpm-lock.yaml',
28+
'--exclude-files', 'docs/README.md',
29+
'--exclude-lines', 'amqp://guest:guest@localhost:5672',
30+
]
31+
1732
- repo: local
1833
hooks:
1934
- id: black

poetry.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pytest = "^7.1.2"
5757
ruff = "^0"
5858
black = { version = "^22.6.0", allow-prereleases = true }
5959
mypy = "^1"
60-
pre-commit = "^2.20.0"
60+
pre-commit = "^4.3.0"
6161
coverage = "^6.4.2"
6262
pytest-cov = "^3.0.0"
6363
mock = "^4.0.3"
@@ -185,3 +185,8 @@ allow-magic-value-types = ["int", "str", "float"]
185185

186186
[tool.ruff.lint.flake8-bugbear]
187187
extend-immutable-calls = ["taskiq_dependencies.Depends", "taskiq.TaskiqDepends"]
188+
189+
[tool.typos.files]
190+
extend-exclude = [
191+
"docs/README.md", # because of identifier in head section
192+
]

taskiq/cli/scheduler/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def get_task_delay(task: ScheduledTask) -> Optional[int]:
8787
# If it's timedelta, we simply add the delta to current time.
8888
if task.cron_offset and isinstance(task.cron_offset, timedelta):
8989
now += task.cron_offset
90-
# If timezone was specified as string we convert it timzone
90+
# If timezone was specified as string we convert it timezone
9191
# offset and then apply.
9292
elif task.cron_offset and isinstance(task.cron_offset, str):
9393
now = now.astimezone(pytz.timezone(task.cron_offset))

0 commit comments

Comments
 (0)