diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5780c8e31..90fa5710c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,16 +26,10 @@ repos: additional_dependencies: - black==25.9.0 - repo: https://github.com/codespell-project/codespell - # Configuration for codespell is in .codespellrc + # Configuration for codespell is in pyproject.toml rev: v2.4.1 hooks: - 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: # python doesn't come with a toml parser prior to 3.11 - "tomli; python_version < '3.11'" diff --git a/codespell-ignore-words.txt b/codespell-ignore-words.txt index 07c9fdb9b..c183affef 100644 --- a/codespell-ignore-words.txt +++ b/codespell-ignore-words.txt @@ -4,4 +4,7 @@ IAM endcode deque thead -lets \ No newline at end of file +lets +fo +malcom +ser \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4ea27a120..6613f1a66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,8 +107,9 @@ known_first_party = [ "rest_framework", "tests" ] [tool.codespell] # Ref: https://github.com/codespell-project/codespell#using-a-config-file -skip = "*/kickstarter-announcement.md,*.js,*.map,*.po" -ignore-words-list = "fo,malcom,ser" +skip = "*/kickstarter-announcement.md,*.js,*.map,*.po,*.css,locale" +ignore-words = "codespell-ignore-words.txt" +builtin = "clear,rare,code,names,en-GB_to_en-US" [tool.pyproject-fmt] max_supported_python = "3.14"