Skip to content

Commit 6cc3ff0

Browse files
committed
Add section to Contributing Guide on how to check PEP spelling
1 parent 250f98e commit 6cc3ff0

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ generate_rss.py @AA-Turner
2727
.codespell/ @CAM-Gerlach
2828
.codespellrc @CAM-Gerlach
2929
.pre-commit-config.yaml @CAM-Gerlach
30+
31+
# Git infrastructure
3032
.gitattributes @CAM-Gerlach
3133
.gitignore @CAM-Gerlach
3234

CONTRIBUTING.rst

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ position within the project.
5656
Run pre-commit linting locally
5757
------------------------------
5858

59-
If you'd like, you can run the project's basic linting suite locally,
59+
If you'd like, you can run this repo's basic linting suite locally,
6060
either on-demand when you choose, or automatically against modified files
6161
whenever you commit your changes.
6262

@@ -84,3 +84,28 @@ every time you commit, install the hooks with ``pre-commit install``.
8484
Then, whenever you ``git commit``, pre-commit will run and report any issues
8585
it finds or changes it makes, and abort the commit to allow you to check,
8686
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.

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ libraries in the ``pep0`` directory.
4343
Checking PEP formatting and rendering
4444
=====================================
4545

46-
Avoid committing changes with reStructuredText syntax errors that cause PEP
47-
generation to fail, or result in major rendering defects relative to what
48-
you intend. To build the HTML output for your PEP (for example, PEP 12)
46+
Please don't commit changes with reStructuredText syntax errors that cause PEP
47+
generation to fail, or result in major rendering defects relative to what you
48+
intend. To check building the HTML output for your PEP (for example, PEP 12)
4949
using the current default docutils-based system, run the ``pep2html.py`` script
50-
with your PEP source file as its argument, e.g. for PEP 12,
51-
``python -X dev pep2html.py pep-0012.rst``,
50+
with your PEP source file as its argument (e.g. for PEP 12,
51+
``python -X dev pep2html.py pep-0012.rst``).
5252
If you're on a system with ``make``, you can instead simply execute, e.g.,
5353
``make pep-0012.rst``.
5454
To generate HTML for all the PEPs, run the script/``make`` without a PEP

0 commit comments

Comments
 (0)