From 1be82f19adb656ee0edd782e09a819da46386fd1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 5 May 2026 11:36:51 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=91=B7=20Add=20pre-commit=20for=20typos=20?= =?utf8?q?(#1899)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com> --- .pre-commit-config.yaml | 6 ++++++ .../insert/annotations/en/tutorial003.md | 2 +- pyproject.toml | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f9e13ea77..4ed941fac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,12 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace + - repo: https://github.com/crate-ci/typos + rev: bbaefadf97b0ec5fdc942684b647f1a6ab250274 # v1.46.0 + hooks: + - id: typos + args: [--force-exclude] + - repo: local hooks: - id: local-ruff-check diff --git a/docs_src/tutorial/insert/annotations/en/tutorial003.md b/docs_src/tutorial/insert/annotations/en/tutorial003.md index 823607856..6e364d407 100644 --- a/docs_src/tutorial/insert/annotations/en/tutorial003.md +++ b/docs_src/tutorial/insert/annotations/en/tutorial003.md @@ -6,7 +6,7 @@ 3. Use a `with` block to create a `Session` using the `engine`. - The new **sesion** will be assigned to the variable `session`. + The new **session** will be assigned to the variable `session`. And it will be automatically closed when the `with` block is finished. diff --git a/pyproject.toml b/pyproject.toml index 3bc56a16a..bbdfe801e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -154,3 +154,22 @@ keep-runtime-typing = true [tool.ty.terminal] error-on-warning = true + +[tool.typos.files] +extend-exclude = [ + "coverage/", + "dist/", + "docs/img/", + "docs/release-notes.md", + "htmlcov/", + "site/", + "site_build/", + "uv.lock", +] + +[tool.typos.default.extend-identifiers] +alls = "alls" + +[tool.typos.default.extend-words] +Ines = "Ines" +selectin = "selectin" -- 2.47.3