Skip to content

Commit 89ae6e0

Browse files
Fix typos in PEPs using codespell (#3909)
1 parent 99e9a5f commit 89ae6e0

20 files changed

+29
-20
lines changed

.codespell/exclude-file.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@
1515

1616
explicitly declared using ``in``, ``out`` and ``inout`` keywords.
1717
| | | | | | | inout |
18+
19+
>>> "abd\
20+
21+
* ``Is``, ``IsNot``, ``In``, and ``NotIn`` are not supported

.codespell/ignore-words.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ arithmetics
66
asend
77
ba
88
ccompiler
9+
checkin
910
clos
1011
complies
1112
crate
1213
dedented
14+
discernable
1315
dota
1416
extraversion
1517
falsy
@@ -18,10 +20,13 @@ groth
1820
iif
1921
implementor
2022
implementors
23+
loath
2124
nd
2225
ned
2326
re-usable
2427
re-use
28+
re-used
29+
re-using
2530
recuse
2631
reenable
2732
referencable

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[codespell]
2-
skip = ./.git
2+
skip = ./.git,./.codespellrc,./build,./ruff_cache,./.venv
33
ignore-words = .codespell/ignore-words.txt
44
exclude-file = .codespell/exclude-file.txt
55
uri-ignore-words-list = daa,ist,searchin,theses

peps/pep-0100.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ raw Unicode UTF-16 data (which the ``bf_getreadbuf`` returns), but
789789
instead tries to encode the Unicode object using the default
790790
encoding and then returns a pointer to the resulting string object
791791
(or raises an exception in case the conversion fails). This was
792-
done in order to prevent accidentely writing binary data to an
792+
done in order to prevent accidentally writing binary data to an
793793
output stream which the other end might not recognize.
794794

795795
This has the advantage of being able to write to output streams

peps/pep-0482.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ ActionScript
7575
------------
7676

7777
ActionScript__ is a class-based, single inheritance,
78-
object-oriented superset of ECMAScript. It supports inferfaces and
78+
object-oriented superset of ECMAScript. It supports interfaces and
7979
strong runtime-checked static typing. Compilation supports a “strict
8080
dialect” where type mismatches are reported at compile-time.
8181

peps/pep-0501.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ dynamic strings incorrectly. This requires a user to actually run a static analy
654654

655655
If :pep:`675` tells you that you are violating a type check, it is up to the programmer to know how to handle the dynamic-ness of the string.
656656
This PEP provides a safer alternative to f-strings at runtime.
657-
If a user recieves a type-error, changing an existing f-string into a t-string could be an easy way to solve the problem.
657+
If a user receives a type-error, changing an existing f-string into a t-string could be an easy way to solve the problem.
658658

659659
t-strings enable safer code by correctly escaping the dynamic sections of strings, while maintaining the static portions.
660660

peps/pep-0540.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ simply that the locale is frequently misconfigured. An obvious solution
6666
suggests itself: ignore the locale encoding and use UTF-8.
6767

6868

69-
Passthough for undecodable bytes: surrogateescape
70-
-------------------------------------------------
69+
Passthrough for undecodable bytes: surrogateescape
70+
--------------------------------------------------
7171

7272
When decoding bytes from UTF-8 using the default ``strict`` error
7373
handler, Python 3 raises a ``UnicodeDecodeError`` on the first

peps/pep-0582.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ significant issue, as it is unlikely that anyone would be able to write to
233233

234234
For a ``__pypackages__`` directory in the current working directory, the
235235
interactive interpreter could be affected. However, this is not significantly
236-
different than the existing issue of someone having a ``math.py`` mdule in their
236+
different than the existing issue of someone having a ``math.py`` module in their
237237
current directory, and while (just like that case) it can cause user confusion,
238238
it does not introduce any new security implications.
239239

peps/pep-0606.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ more incompatible changes. The technical debt only steadily
117117
increases over time.
118118

119119
With backward compatibility, it becomes possible to upgrade Python
120-
increamentally in a project, without having to fix all of the issues at once.
120+
incrementally in a project, without having to fix all of the issues at once.
121121

122122
The "all-or-nothing" is a showstopper to port large Python 2 code bases
123123
to Python 3. The list of incompatible changes between Python 2 and

peps/pep-0626.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ generated for all lines of code, and only for actual code.
3131
They should also be able to assume that the line number in ``f_lineno`` is correct.
3232

3333
The current implementation mostly does this, but fails in a few cases.
34-
This requires workarounds in tooling and is a nuisance for alternative Python implementions.
34+
This requires workarounds in tooling and is a nuisance for alternative Python implementations.
3535

3636
Having this guarantee also benefits implementers of CPython in the long term, as the current behaviour is not obvious and has some odd corner cases.
3737

0 commit comments

Comments
 (0)