]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commitdiff
👷 Add pre-commit for typos (#1899)
authorSebastián Ramírez <tiangolo@gmail.com>
Tue, 5 May 2026 09:36:51 +0000 (11:36 +0200)
committerGitHub <noreply@github.com>
Tue, 5 May 2026 09:36:51 +0000 (09:36 +0000)
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
.pre-commit-config.yaml
docs_src/tutorial/insert/annotations/en/tutorial003.md
pyproject.toml

index f9e13ea7751766a59d30095b9a73a9006c98dceb..4ed941face0678b631aa30b782611051ffa492ee 100644 (file)
@@ -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
index 82360785676163288cf8b63dff79df9ce229ea20..6e364d407baaf80d747c18def9dd3385eeb2890e 100644 (file)
@@ -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.
 
index 3bc56a16a12d87ead52e031e5d1f6eb1d9086941..bbdfe801ed10ac2c8b812d202fe165d28cfd19fb 100644 (file)
@@ -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"