Skip to content

Commit fb03dd9

Browse files
authored
Add codespell: config + workflow to detect new typos. Get some typos fixed (encode#9234)
* Do not ignore .codespellrc from git * Add rudimentary codespell config * Add pre-commit definition for codespell * more custom skips for codespell - long lines, lines with ú etc * [DATALAD RUNCMD] Do interactive fixing of some ambigous typos === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 2 ./docs/community/release-notes.md", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ * BF: pre-commit needs to duplicate some of the skips for codespell Known issue -- yet to be addressed: codespell-project/codespell#3196 * Move codespell configuration into setup.cfg
1 parent 3c9490b commit fb03dd9

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ repos:
2525
exclude: ^(?!docs).*$
2626
additional_dependencies:
2727
- black==23.1.0
28+
- repo: https://github.com/codespell-project/codespell
29+
# Configuration for codespell is in .codespellrc
30+
rev: v2.2.6
31+
hooks:
32+
- id: codespell
33+
exclude: locale|kickstarter-announcement.md|coreapi-0.1.1.js

docs/community/release-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ See the [release announcement][3.6-release].
946946
* description.py codes and tests removal. ([#4153][gh4153])
947947
* Wrap guardian.VERSION in tuple. ([#4149][gh4149])
948948
* Refine validator for fields with <source=> kwargs. ([#4146][gh4146])
949-
* Fix None values representation in childs of ListField, DictField. ([#4118][gh4118])
949+
* Fix None values representation in children of ListField, DictField. ([#4118][gh4118])
950950
* Resolve TimeField representation for midnight value. ([#4107][gh4107])
951951
* Set proper status code in AdminRenderer for the redirection after POST/DELETE requests. ([#4106][gh4106])
952952
* TimeField render returns None instead of 00:00:00. ([#4105][gh4105])

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ include = rest_framework/*,tests/*
2929
exclude_lines =
3030
pragma: no cover
3131
raise NotImplementedError
32+
33+
[codespell]
34+
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
35+
skip = */kickstarter-announcement.md,*.js,*.map,*.po
36+
ignore-words-list = fo,malcom,ser

0 commit comments

Comments
 (0)