Skip to content

Commit c90a5de

Browse files
authored
[3.6] bpo-32746: Fix multiple typos (GH-5144) (GH-5522)
Fix typos found by codespell in docs, docstrings, and comments. Fixes for the following files were in post-3.6 code and not backported: Lib/ctypes/_aix.py (new), Lib/test/test_concurrent_futures.py, Modules/_asynciomodule.c, Modules/_pickle.c, Objects/obmalloc.c. (cherry picked from commit c3d9508)
1 parent 0cb82eb commit c90a5de

File tree

17 files changed

+23
-24
lines changed

17 files changed

+23
-24
lines changed

Doc/library/optparse.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ An option group is obtained using the class :class:`OptionGroup`:
567567

568568
where
569569

570-
* parser is the :class:`OptionParser` instance the group will be insterted in
570+
* parser is the :class:`OptionParser` instance the group will be inserted in
571571
to
572572
* title is the group title
573573
* description, optional, is a long description of the group

Doc/library/ossaudiodev.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ the standard audio interface for Linux and recent versions of FreeBSD.
1414
.. Things will get more complicated for future Linux versions, since
1515
ALSA is in the standard kernel as of 2.5.x. Presumably if you
1616
use ALSA, you'll have to make sure its OSS compatibility layer
17-
is active to use ossaudiodev, but you're gonna need it for the vast
17+
is active to use ossaudiodev, but you're going to need it for the vast
1818
majority of Linux audio apps anyway.
1919
2020
Sounds like things are also complicated for other BSDs. In response
@@ -447,4 +447,3 @@ The remaining methods are specific to audio mixing:
447447
microphone input::
448448

449449
mixer.setrecsrc (1 << ossaudiodev.SOUND_MIXER_MIC)
450-

Lib/email/_header_value_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2746,8 +2746,8 @@ def _fold_mime_parameters(part, lines, maxlen, encoding):
27462746
27472747
Using the decoded list of parameters and values, format them according to
27482748
the RFC rules, including using RFC2231 encoding if the value cannot be
2749-
expressed in 'encoding' and/or the paramter+value is too long to fit within
2750-
'maxlen'.
2749+
expressed in 'encoding' and/or the parameter+value is too long to fit
2750+
within 'maxlen'.
27512751
27522752
"""
27532753
# Special case for RFC2231 encoding: start from decoded values and use

Lib/idlelib/configdialog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ def create_page_font_tab(self):
495495
Changing any of the font vars invokes var_changed_font, which
496496
adds all 3 font options to changes and calls set_samples.
497497
Set_samples applies a new font constructed from the font vars to
498-
font_sample and to highlight_sample on the hightlight page.
498+
font_sample and to highlight_sample on the highlight page.
499499
500500
Tabs: Enable users to change spaces entered for indent tabs.
501501
Changing indent_scale value with the mouse sets Var space_num,
@@ -646,7 +646,7 @@ def set_samples(self, event=None):
646646
647647
Called on font initialization and change events.
648648
Accesses font_name, font_size, and font_bold Variables.
649-
Updates font_sample and hightlight page highlight_sample.
649+
Updates font_sample and highlight page highlight_sample.
650650
"""
651651
font_name = self.font_name.get()
652652
font_weight = tkFont.BOLD if self.font_bold.get() else tkFont.NORMAL

Lib/opcode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def jabs_op(name, op):
142142
def_op('BUILD_TUPLE', 102) # Number of tuple items
143143
def_op('BUILD_LIST', 103) # Number of list items
144144
def_op('BUILD_SET', 104) # Number of set items
145-
def_op('BUILD_MAP', 105) # Number of dict entries (upto 255)
145+
def_op('BUILD_MAP', 105) # Number of dict entries
146146
name_op('LOAD_ATTR', 106) # Index in name list
147147
def_op('COMPARE_OP', 107) # Comparison operator
148148
hascompare.append(107)

Lib/test/datetimetester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,7 @@ def test_tz_independent_comparing(self):
17091709

17101710
# Make sure comparison doesn't forget microseconds, and isn't done
17111711
# via comparing a float timestamp (an IEEE double doesn't have enough
1712-
# precision to span microsecond resolution across years 1 thru 9999,
1712+
# precision to span microsecond resolution across years 1 through 9999,
17131713
# so comparing via timestamp necessarily calls some distinct values
17141714
# equal).
17151715
dt1 = self.theclass(MAXYEAR, 12, 31, 23, 59, 59, 999998)

Lib/test/test_cmd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class samplecmdclass(cmd.Cmd):
5252
5353
Test for the function completedefault():
5454
>>> mycmd.completedefault()
55-
This is the completedefault methode
55+
This is the completedefault method
5656
>>> mycmd.completenames("a")
5757
['add']
5858
@@ -141,7 +141,7 @@ def postloop(self):
141141
print("Hello from postloop")
142142

143143
def completedefault(self, *ignored):
144-
print("This is the completedefault methode")
144+
print("This is the completedefault method")
145145

146146
def complete_command(self):
147147
print("complete command")

Lib/test/test_generators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ def second():
15171517
succs[final].remove(corner)
15181518
add_to_successors(this)
15191519

1520-
# Generate moves 3 thru m*n-1.
1520+
# Generate moves 3 through m*n-1.
15211521
def advance(len=len):
15221522
# If some successor has only one exit, must take it.
15231523
# Else favor successors with fewer exits.
@@ -1539,7 +1539,7 @@ def advance(len=len):
15391539
yield i
15401540
add_to_successors(i)
15411541

1542-
# Generate moves 3 thru m*n-1. Alternative version using a
1542+
# Generate moves 3 through m*n-1. Alternative version using a
15431543
# stronger (but more expensive) heuristic to order successors.
15441544
# Since the # of backtracking levels is m*n, a poor move early on
15451545
# can take eons to undo. Smallest square board for which this

Lib/test/test_weakref.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,7 @@ def __eq__(self, other):
16371637
# has to keep looping to find the first object we delete.
16381638
objs.reverse()
16391639

1640-
# Turn on mutation in C.__eq__. The first time thru the loop,
1640+
# Turn on mutation in C.__eq__. The first time through the loop,
16411641
# under the iterkeys() business the first comparison will delete
16421642
# the last item iterkeys() would see, and that causes a
16431643
# RuntimeError: dictionary changed size during iteration

Lib/unittest/test/test_discovery.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ def loadTestsFromModule(module, pattern=None):
199199
['a_directory', 'test_directory', 'test_directory2'])
200200

201201
# load_tests should have been called once with loader, tests and pattern
202-
# (but there are no tests in our stub module itself, so thats [] at the
203-
# time of call.
202+
# (but there are no tests in our stub module itself, so that is [] at
203+
# the time of call).
204204
self.assertEqual(Module.load_tests_args,
205205
[(loader, [], 'test*')])
206206

0 commit comments

Comments
 (0)