From e632595466b4e1758500c8cf65d82c22258cd472 Mon Sep 17 00:00:00 2001 From: Anfimov Dima Date: Thu, 23 Oct 2025 11:25:28 +0200 Subject: [PATCH 1/4] chore: add typos pre-commit --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54d9fe93..2afbaa47 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,11 @@ repos: hooks: - id: add-trailing-comma + - repo: https://github.com/crate-ci/typos + rev: v1.38.1 + hooks: + - id: typos + - repo: local hooks: - id: black From 3807b4adcff4f221b4c1e90cad26121aee10b44a Mon Sep 17 00:00:00 2001 From: Anfimov Dima Date: Thu, 23 Oct 2025 11:33:35 +0200 Subject: [PATCH 2/4] chore: update pre-commit package version (bacause it is not working with typos) --- poetry.lock | 12 ++++++------ pyproject.toml | 2 +- taskiq/cli/scheduler/run.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/poetry.lock b/poetry.lock index 562f0d68..803af00d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.4 and should not be changed by hand. [[package]] name = "aiohappyeyeballs" @@ -1224,14 +1224,14 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "2.21.0" +version = "4.3.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "pre_commit-2.21.0-py2.py3-none-any.whl", hash = "sha256:e2f91727039fc39a92f58a588a25b87f936de6567eed4f0e673e0507edc75bad"}, - {file = "pre_commit-2.21.0.tar.gz", hash = "sha256:31ef31af7e474a8d8995027fefdfcf509b5c913ff31f2015b4ec4beb26a6f658"}, + {file = "pre_commit-4.3.0-py2.py3-none-any.whl", hash = "sha256:2b0747ad7e6e967169136edffee14c16e148a778a54e4f967921aa1ebf2308d8"}, + {file = "pre_commit-4.3.0.tar.gz", hash = "sha256:499fe450cc9d42e9d58e606262795ecb64dd05438943c62b66f6a8673da30b16"}, ] [package.dependencies] @@ -2370,4 +2370,4 @@ zmq = ["pyzmq"] [metadata] lock-version = "2.1" python-versions = "^3.9" -content-hash = "9e62c68bad1d9bea49c326a19c3a8686cdabf6fa64c8a3f23cd8e35aeede204b" +content-hash = "8ede2b0845e691ebbdc2740c7b17d44aa489635c934ea77adbf047c02341a04e" diff --git a/pyproject.toml b/pyproject.toml index 98ba5d83..f3e94e0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/taskiq/cli/scheduler/run.py b/taskiq/cli/scheduler/run.py index 7a7d9f53..4e25ea1e 100644 --- a/taskiq/cli/scheduler/run.py +++ b/taskiq/cli/scheduler/run.py @@ -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)) From 39167a0e77260ce0ecc340221c46efbdbb4251d1 Mon Sep 17 00:00:00 2001 From: Anfimov Dima Date: Thu, 23 Oct 2025 11:34:46 +0200 Subject: [PATCH 3/4] chore: exclude docs/README.md from typos checks --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f3e94e0a..6a900425 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 +] From 68f954049bc1466d5e7f8d87e9080e1a30d355fd Mon Sep 17 00:00:00 2001 From: Anfimov Dima Date: Thu, 23 Oct 2025 11:42:48 +0200 Subject: [PATCH 4/4] chore: add detect-secrets and update pre-commit hooks versions --- .pre-commit-config.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2afbaa47..642591b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # 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 @@ -10,7 +10,7 @@ repos: - 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 @@ -19,6 +19,16 @@ repos: 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