Skip to content

Commit cfca4a6

Browse files
authored
[3.10] Fix typos in the Lib directory (GH-28775) (GH-28804)
Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <[email protected]>. (cherry picked from commit 745c9d9) Co-authored-by: Christian Clauss <[email protected]>
1 parent 03bf55d commit cfca4a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+79
-79
lines changed

Lib/asyncio/events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ async def connect_read_pipe(self, protocol_factory, pipe):
479479
# The reason to accept file-like object instead of just file descriptor
480480
# is: we need to own pipe and close it at transport finishing
481481
# Can got complicated errors if pass f.fileno(),
482-
# close fd in pipe transport then close f and vise versa.
482+
# close fd in pipe transport then close f and vice versa.
483483
raise NotImplementedError
484484

485485
async def connect_write_pipe(self, protocol_factory, pipe):
@@ -492,7 +492,7 @@ async def connect_write_pipe(self, protocol_factory, pipe):
492492
# The reason to accept file-like object instead of just file descriptor
493493
# is: we need to own pipe and close it at transport finishing
494494
# Can got complicated errors if pass f.fileno(),
495-
# close fd in pipe transport then close f and vise versa.
495+
# close fd in pipe transport then close f and vice versa.
496496
raise NotImplementedError
497497

498498
async def subprocess_shell(self, protocol_factory, cmd, *,

Lib/asyncio/unix_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ def add_child_handler(self, pid, callback, *args):
13791379
def remove_child_handler(self, pid):
13801380
# asyncio never calls remove_child_handler() !!!
13811381
# The method is no-op but is implemented because
1382-
# abstract base classe requires it
1382+
# abstract base classes requires it
13831383
return True
13841384

13851385
def attach_loop(self, loop):

Lib/ctypes/_aix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def get_legacy(members):
163163
return member
164164
else:
165165
# 32-bit legacy names - both shr.o and shr4.o exist.
166-
# shr.o is the preffered name so we look for shr.o first
166+
# shr.o is the preferred name so we look for shr.o first
167167
# i.e., shr4.o is returned only when shr.o does not exist
168168
for name in ['shr.o', 'shr4.o']:
169169
member = get_one_match(re.escape(name), members)

Lib/ctypes/test/test_structures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,15 +443,15 @@ def __del__(self):
443443

444444
s = Test(1, 2, 3)
445445
# Test the StructUnionType_paramfunc() code path which copies the
446-
# structure: if the stucture is larger than sizeof(void*).
446+
# structure: if the structure is larger than sizeof(void*).
447447
self.assertGreater(sizeof(s), sizeof(c_void_p))
448448

449449
dll = CDLL(_ctypes_test.__file__)
450450
func = dll._testfunc_large_struct_update_value
451451
func.argtypes = (Test,)
452452
func.restype = None
453453
func(s)
454-
# bpo-37140: Passing the structure by refrence must not call
454+
# bpo-37140: Passing the structure by reference must not call
455455
# its finalizer!
456456
self.assertEqual(finalizer_calls, [])
457457
self.assertEqual(s.first, 1)

Lib/difflib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class SequenceMatcher:
6262
notion, pairing up elements that appear uniquely in each sequence.
6363
That, and the method here, appear to yield more intuitive difference
6464
reports than does diff. This method appears to be the least vulnerable
65-
to synching up on blocks of "junk lines", though (like blank lines in
65+
to syncing up on blocks of "junk lines", though (like blank lines in
6666
ordinary text files, or maybe "<P>" lines in HTML files). That may be
6767
because this is the only method of the 3 that has a *concept* of
6868
"junk" <wink>.

Lib/distutils/ccompiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def _fix_compile_args(self, output_dir, macros, include_dirs):
392392
return output_dir, macros, include_dirs
393393

394394
def _prep_compile(self, sources, output_dir, depends=None):
395-
"""Decide which souce files must be recompiled.
395+
"""Decide which source files must be recompiled.
396396
397397
Determine the list of object files corresponding to 'sources',
398398
and figure out which ones really need to be recompiled.

Lib/distutils/command/install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# while making the sysconfig module the single point of truth.
3232
# This makes it easier for OS distributions where they need to
3333
# alter locations for packages installations in a single place.
34-
# Note that this module is depracated (PEP 632); all consumers
34+
# Note that this module is deprecated (PEP 632); all consumers
3535
# of this information should switch to using sysconfig directly.
3636
INSTALL_SCHEMES = {"unix_prefix": {}, "unix_home": {}, "nt": {}}
3737

@@ -43,7 +43,7 @@
4343
sys_key = key
4444
sys_scheme = sysconfig._INSTALL_SCHEMES[sys_scheme_name]
4545
if key == "headers" and key not in sys_scheme:
46-
# On POSIX-y platofrms, Python will:
46+
# On POSIX-y platforms, Python will:
4747
# - Build from .h files in 'headers' (only there when
4848
# building CPython)
4949
# - Install .h files to 'include'

Lib/email/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ class NonASCIILocalPartDefect(HeaderDefect):
110110
# parsing messages decoded from binary.
111111

112112
class InvalidDateDefect(HeaderDefect):
113-
"""Header has unparseable or invalid date"""
113+
"""Header has unparsable or invalid date"""

Lib/html/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def parse_endtag(self, i):
405405
tagname = namematch.group(1).lower()
406406
# consume and ignore other stuff between the name and the >
407407
# Note: this is not 100% correct, since we might have things like
408-
# </tag attr=">">, but looking for > after tha name should cover
408+
# </tag attr=">">, but looking for > after the name should cover
409409
# most of the cases and is much simpler
410410
gtpos = rawdata.find('>', namematch.end())
411411
self.handle_endtag(tagname)

Lib/idlelib/ChangeLog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ Wed Mar 10 05:18:02 1999 Guido van Rossum <[email protected]>
11751175
classes in selected module
11761176
methods of selected class
11771177

1178-
Sinlge clicking in a directory, module or class item updates the next
1178+
Single clicking in a directory, module or class item updates the next
11791179
column with info about the selected item. Double clicking in a
11801180
module, class or method item opens the file (and selects the clicked
11811181
item if it is a class or method).

0 commit comments

Comments
 (0)