Cleanup pre-commit config by moving codespell configuration to pyproject.toml (#9864)

This commit is contained in:
Pravin 2026-01-05 20:19:40 +05:30 committed by GitHub
parent d881b27811
commit 3f190b7ddc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 10 deletions

View File

@ -26,16 +26,10 @@ repos:
additional_dependencies: additional_dependencies:
- black==25.9.0 - black==25.9.0
- repo: https://github.com/codespell-project/codespell - repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in .codespellrc # Configuration for codespell is in pyproject.toml
rev: v2.4.1 rev: v2.4.1
hooks: hooks:
- id: codespell - id: codespell
args: [
"--builtin", "clear,rare,code,names,en-GB_to_en-US",
"--ignore-words", "codespell-ignore-words.txt",
"--skip", "*.css",
]
exclude: locale|kickstarter-announcement.md|coreapi-0.1.1.js
additional_dependencies: additional_dependencies:
# python doesn't come with a toml parser prior to 3.11 # python doesn't come with a toml parser prior to 3.11
- "tomli; python_version < '3.11'" - "tomli; python_version < '3.11'"

View File

@ -4,4 +4,7 @@ IAM
endcode endcode
deque deque
thead thead
lets lets
fo
malcom
ser

View File

@ -107,8 +107,9 @@ known_first_party = [ "rest_framework", "tests" ]
[tool.codespell] [tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file # Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = "*/kickstarter-announcement.md,*.js,*.map,*.po" skip = "*/kickstarter-announcement.md,*.js,*.map,*.po,*.css,locale"
ignore-words-list = "fo,malcom,ser" ignore-words = "codespell-ignore-words.txt"
builtin = "clear,rare,code,names,en-GB_to_en-US"
[tool.pyproject-fmt] [tool.pyproject-fmt]
max_supported_python = "3.14" max_supported_python = "3.14"