@@ -84,3 +84,28 @@ every time you commit, install the hooks with ``pre-commit install``.
84
84
Then, whenever you ``git commit ``, pre-commit will run and report any issues
85
85
it finds or changes it makes, and abort the commit to allow you to check,
86
86
and if necessary correct them before committing again.
87
+
88
+
89
+ Check and fix PEP spelling
90
+ --------------------------
91
+
92
+ To check for common spelling mistakes in your PEP and automatically suggest
93
+ corrections, you can run the codespell tool through pre-commit as well.
94
+
95
+ Like the linters, on a system with ``make `` available, it can be installed
96
+ (in the currently-activated environment) and run on all files in the
97
+ repository with a single command, ``make spellcheck ``.
98
+
99
+ For finer control or on other systems, after installing pre-commit as above
100
+ (e.g. ``pip install pre-commit ``), you can run it against only the files
101
+ you've modified and not yet committed with
102
+ ``pre-commit run --hook-stage manual codespell ``, or against all files with
103
+ ``pre-commit run --all-files --hook-stage manual codespell ``.
104
+
105
+ **Note **: While fixing spelling mistakes as part of more substantive
106
+ copyediting and proofreading of draft and active PEPs is okay,
107
+ we generally advise against PRs that simply mass-correct minor typos on
108
+ older PEPs that don't significantly impair meaning and understanding,
109
+ as these tend to create a fairly high level of noise and churn for
110
+ PEP readers, authors and editors relative to the amount of practical value
111
+ they provide.
0 commit comments