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

+4
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

+5
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+2-2
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

+1-1
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

+1-1
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

+1-1
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

peps/pep-0639.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ in a :ref:`separate page <639-rejected-ideas-details>`.
812812
Appendices
813813
==========
814814

815-
A list of auxilliary documents is provided:
815+
A list of auxiliary documents is provided:
816816

817817
- Detailed :ref:`Licensing Examples <639-examples>`,
818818
- :ref:`User Scenarios <639-user-scenarios>`,

peps/pep-0639/appendix-rejected-ideas.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ approach to specify their license files location. It was pointed out that
250250
it is easily possible to incorrectly assume that paths also support
251251
globs.
252252

253-
Therfore, it was decided against this approach in favor of a flat array value
253+
Therefore, it was decided against this approach in favor of a flat array value
254254
which simplifies the specification and implementation,
255255
and more closely matches the configuration format of existing tools.
256256
The PEP recommends not to use other than alphanumerical symbols and dot

peps/pep-0697.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ It will be an error to *not* use ``Py_RELATIVE_OFFSET`` with negative
421421
``PyMember_SetOne``).
422422

423423
CPython will adjust the offset and clear the ``Py_RELATIVE_OFFSET`` flag when
424-
intitializing a type.
424+
initializing a type.
425425
This means that:
426426

427427
* the created type's ``tp_members`` will not match the input

peps/pep-0724.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ user-defined type guard function changes in two ways.
173173
reveal_type(direction) # "Literal[NW]"
174174
175175
176-
The type-theoretic rules for type narrowing are specificed in the following
176+
The type-theoretic rules for type narrowing are specified in the following
177177
table.
178178

179179
============ ======================= ===================
@@ -267,7 +267,7 @@ behavior. Such type guard functions could break with the new behavior.
267267
# "str", which is perhaps not what was intended.
268268
reveal_type(val)
269269
270-
We think it is unlikley that such user-defined type guards exist in real-world
270+
We think it is unlikely that such user-defined type guards exist in real-world
271271
code. The mypy primer results didn't uncover any such cases.
272272

273273

peps/pep-0739.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ One of the main requests in the discussion of this PEP was the inclusion of
554554
other kind of information, such as the ``site-packages`` path. It is the opinion
555555
of the PEP author that information regarding the Python environment should be
556556
provided by a separate file, creating the a clear separation between the build
557-
details, which should be immutable accross any interpreter instance, and details
557+
details, which should be immutable across any interpreter instance, and details
558558
that can change, such as environment details.
559559

560560

peps/pep-0741.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ any proposal to add a granular initialization API around phases is
982982
effectively the opposite of what this PEP is trying to accomplish.
983983
Such API is more complicated, it requires adding new public structures
984984
and new public functions. It makes the Python initialization more
985-
complicated, rather than this PEP tries to unifiy existing APIs and make
985+
complicated, rather than this PEP tries to unify existing APIs and make
986986
them simpler (the opposite). Having multiple structures for similar
987987
purpose can lead to duplicate members, similar issue than duplicated
988988
members between existing ``PyPreConfig`` and ``PyConfig`` structures.

peps/pep-0744.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ Choose the sections that best describe you:
340340

341341
- ...in general, the JIT shouldn't be much of an inconvenience to you
342342
(depending on what you're trying to do). The micro-op interpreter isn't
343-
going anywhere, and still offers a debugging experience similer to what
343+
going anywhere, and still offers a debugging experience similar to what
344344
the main bytecode interpreter provides today. There is moderate likelihood
345345
that larger changes to the interpreter (such as adding new local
346346
variables, changing error handling and deoptimization logic, or changing

peps/pep-0747.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ as an implicit ``TypeExpr`` value and be used directly in a context where a
10241024
``TypeExpr`` was expected. However making that possible would require making
10251025
changes to the rules that type checkers use for the ``|`` operator. These rules
10261026
are currently underspecified and would need to be make explicit first,
1027-
before making changes to them. The PEP author is not sufficently motivated to
1027+
before making changes to them. The PEP author is not sufficiently motivated to
10281028
take on that specification work at the time of writing.
10291029

10301030

peps/pep-0751.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ unless otherwise specified for the same reason.
440440
- Tables can be written inline.
441441
- Represents the files to potentially install for the package and version.
442442
- Entries in ``[[packages.files]]`` SHOULD be lexicographically sorted by
443-
``packages.files.name`` key to minimze changes in diffs.
443+
``packages.files.name`` key to minimize changes in diffs.
444444

445445

446446
``packages.files.name``

peps/pep-8014.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ The PEP author presents the PEP and the vote results to the Council of Elders.
132132
The council ponders two things:
133133

134134
- the PEP gravity and its implications,
135-
- the measureable vote results (how many people voted, which individuals voted, what they voted).
135+
- the measurable vote results (how many people voted, which individuals voted, what they voted).
136136

137137
They pronounce a tentative decision on whether the vote passed and this decision is published.
138138

0 commit comments

Comments
 (0)