From: Sebastián Ramírez Date: Tue, 5 May 2026 09:36:51 +0000 (+0200) Subject: 👷 Add pre-commit for typos (#1899) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1be82f19adb656ee0edd782e09a819da46386fd1;p=thirdparty%2Ffastapi%2Fsqlmodel.git 👷 Add pre-commit for typos (#1899) Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com> --- 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"