Skip to content

Commit 4346b81

Browse files
authored
[3.9] Fix typos in the Lib directory (GH-28775) (GH-28803)
Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit 745c9d9) Automerge-Triggered-By: GH:JulienPalard
1 parent da56601 commit 4346b81

53 files changed

Lines changed: 67 additions & 67 deletions

Some content is hidden

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

Lib/asyncio/events.py

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

471471
async def connect_write_pipe(self, protocol_factory, pipe):
@@ -478,7 +478,7 @@ async def connect_write_pipe(self, protocol_factory, pipe):
478478
# The reason to accept file-like object instead of just file descriptor
479479
# is: we need to own pipe and close it at transport finishing
480480
# Can got complicated errors if pass f.fileno(),
481-
# close fd in pipe transport then close f and vise versa.
481+
# close fd in pipe transport then close f and vice versa.
482482
raise NotImplementedError
483483

484484
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
@@ -1383,7 +1383,7 @@ def add_child_handler(self, pid, callback, *args):
13831383
def remove_child_handler(self, pid):
13841384
# asyncio never calls remove_child_handler() !!!
13851385
# The method is no-op but is implemented because
1386-
# abstract base classe requires it
1386+
# abstract base classes requires it
13871387
return True
13881388

13891389
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/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 <guido@cnri.reston.va.us>
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).

Lib/idlelib/idle_test/htest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def _wrapper(parent): # htest #
246246
_object_browser_spec = {
247247
'file': 'debugobj',
248248
'kwds': {},
249-
'msg': "Double click on items upto the lowest level.\n"
249+
'msg': "Double click on items up to the lowest level.\n"
250250
"Attributes of the objects and related information "
251251
"will be displayed side-by-side at each level."
252252
}
@@ -255,7 +255,7 @@ def _wrapper(parent): # htest #
255255
'file': 'pathbrowser',
256256
'kwds': {},
257257
'msg': "Test for correct display of all paths in sys.path.\n"
258-
"Toggle nested items upto the lowest level.\n"
258+
"Toggle nested items up to the lowest level.\n"
259259
"Double clicking on an item prints a traceback\n"
260260
"for an exception that is ignored."
261261
}
@@ -341,7 +341,7 @@ def _wrapper(parent): # htest #
341341
'file': 'tree',
342342
'kwds': {},
343343
'msg': "The canvas is scrollable.\n"
344-
"Click on folders upto to the lowest level."
344+
"Click on folders up to to the lowest level."
345345
}
346346

347347
_undo_delegator_spec = {

Lib/idlelib/idle_test/mock_tk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def tearDownClass(cls):
7979
---
8080
For 'ask' functions, set func.result return value before calling the method
8181
that uses the message function. When messagebox functions are the
82-
only gui alls in a method, this replacement makes the method gui-free,
82+
only GUI calls in a method, this replacement makes the method GUI-free,
8383
"""
8484
askokcancel = Mbox_func() # True or False
8585
askquestion = Mbox_func() # 'yes' or 'no'

0 commit comments

Comments
 (0)