Skip to content

Commit 3c6e378

Browse files
committed
Spelling corrections
1 parent 51141ad commit 3c6e378

File tree

17 files changed

+88
-54
lines changed

17 files changed

+88
-54
lines changed

test/ok_lib2.7/bsddb/dbshelve.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#------------------------------------------------------------------------
3030

3131
import sys
32+
3233
absolute_import = (sys.version_info[0] >= 3)
3334
if absolute_import :
3435
# Because this syntaxis is not valid before Python 2.5
@@ -229,7 +230,7 @@ def append(self, value, txn=None):
229230

230231
def associate(self, secondaryDB, callback, flags=0):
231232
def _shelf_callback(priKey, priData, realCallback=callback):
232-
# Safe in Python 2.x because expresion short circuit
233+
# Safe in Python 2.x because expression short circuit
233234
if sys.version_info[0] < 3 or isinstance(priData, bytes) :
234235
data = cPickle.loads(priData)
235236
else :
@@ -366,7 +367,7 @@ def _extract(self, rec):
366367
return None
367368
else:
368369
key, data = rec
369-
# Safe in Python 2.x because expresion short circuit
370+
# Safe in Python 2.x because expression short circuit
370371
if sys.version_info[0] < 3 or isinstance(data, bytes) :
371372
return key, cPickle.loads(data)
372373
else :

test/simple_source/bug26/03_weird26.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# Grammar allows multiple adjacent 'if's in listcomps and genexps,
44
# even though it's silly. Make sure it works (ifelse broke this.)
55

6-
[ x for x in range(10) if x % 2 if x % 3 ]
6+
[x for x in range(10) if x % 2 if x % 3]
77
list(x for x in range(10) if x % 2 if x % 3)
88

9-
# expresion which evaluates True unconditionally,
9+
# expression which evaluates True unconditionally,
1010
# but leave dead code or junk around that we have to match on.
1111
# Tests "if_exp_true" rule
1212
5 if 1 else 2

test/simple_source/bug27+/01_module_doc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# From 2.7.17 test_bdb.py
2-
# The problem was detecting a docstring at the begining of the module
2+
# The problem was detecting a docstring at the beginning of the module
33
# It must be detected and change'd or else the "from __future__" below
44
# is invalid.
5-
# Note that this has to be compiled with optimation < 2 or else optimization
5+
# Note that this has to be compiled with optimization < 2 or else optimization
66
# will remove the docstring
77
"""Rational, infinite-precision, real numbers."""
88

test/simple_source/bug30/01_ops.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Statements to beef up grammar coverage rules
22
# Force "inplace" ops
33
# Note this is like simple_source/bug22/01_ops.py
4-
# But we don't ahve the UNARY_CONVERT which dropped
4+
# But we don't have the UNARY_CONVERT which dropped
55
# out around 2.7
66
y = +10 # UNARY_POSITIVE
7-
y /= 1 # INPLACE_DIVIDE
8-
y %= 4 # INPLACE_MODULO
7+
y /= 1 # INPLACE_DIVIDE
8+
y %= 4 # INPLACE_MODULO
99
y **= 1 # INPLACE POWER
1010
y >>= 2 # INPLACE_RSHIFT
1111
y <<= 2 # INPLACE_LSHIFT
1212
y //= 1 # INPLACE_TRUE_DIVIDE
13-
y &= 1 # INPLACE_AND
14-
y ^= 1 # INPLACE_XOR
13+
y &= 1 # INPLACE_AND
14+
y ^= 1 # INPLACE_XOR
1515

1616
# Beef up aug_assign and STORE_SLICE+3
17-
x = [1,2,3,4,5]
17+
x = [1, 2, 3, 4, 5]
1818
x[0:1] = 1
1919
x[0:3] += 1, 2, 3
2020

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# From 3.x test_audiop.py
22

33
# Bug is handling default value after * argument in a lambda.
4-
# That's a mouthful of desciption; I am not sure if the really
4+
# That's a mouthful of description; I am not sure if the really
55
# hacky fix to the code is even correct.
66

77
#
88
# FIXME: try and test with more than one default argument.
99

10+
1011
# RUNNABLE
1112
def pack(width, data):
1213
return (width, data)
1314

15+
1416
packs = {w: (lambda *data, width=w: pack(width, data)) for w in (1, 2, 4)}
1517

16-
assert packs[1]('a') == (1, ('a',))
17-
assert packs[2]('b') == (2, ('b',))
18-
assert packs[4]('c') == (4, ('c',))
18+
assert packs[1]("a") == (1, ("a",))
19+
assert packs[2]("b") == (2, ("b",))
20+
assert packs[4]("c") == (4, ("c",))

test/simple_source/bug33/08_if_else.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# From python 3.3.7 trace
22
# Bug was not having not having semantic rule for conditional not
33

4+
45
# RUNNABLE!
56
def init(modules=None):
67
mods = set() if not modules else set(modules)
78
return mods
89

10+
911
assert init() == set()
1012
assert init([1, 2, 3]) == set([1, 2, 3])
1113

14+
1215
# From 3.6 sre_parse
13-
# Bug was in handling multple COME_FROMS from nested if's
16+
# Bug was in handling multiple COME_FROMS from nested if's
1417
def _escape(a, b, c, d, e):
1518
if a:
1619
if b:
@@ -24,15 +27,16 @@ def _escape(a, b, c, d, e):
2427
return
2528
raise
2629

27-
assert _escape(False, True, True, True, True) is None
28-
assert _escape(True, True, True, False, True) is None
29-
assert _escape(True, True, False, False, True) is None
30+
31+
assert _escape(False, True, True, True, True) is None
32+
assert _escape(True, True, True, False, True) is None
33+
assert _escape(True, True, False, False, True) is None
3034

3135
for args in (
32-
(True, True, True, False, True),
33-
(True, False, True, True, True),
34-
(True, False, True, True, False),
35-
):
36+
(True, True, True, False, True),
37+
(True, False, True, True, True),
38+
(True, False, True, True, False),
39+
):
3640
try:
3741
_escape(*args)
3842
assert False, args

test/simple_source/bug35/06_while_return.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# From Python 3.4 asynchat.py
2-
# Tests presence or absense of
2+
# Tests presence or absence of
33
# SETUP_LOOP testexpr return_stmts POP_BLOCK COME_FROM_LOOP
44
# Note: that there is no JUMP_BACK because of the return_stmts.
55

6+
67
def initiate_send(a, b, c, num_sent):
78
while a and b:
89
try:
@@ -24,6 +25,7 @@ def initiate_send2(a, b):
2425

2526
return 2
2627

28+
2729
assert initiate_send(1, 1, 2, False) == 1
2830
assert initiate_send(1, 2, 3, False) == 3
2931
assert initiate_send(1, 2, 3, True) == 2

test/simple_source/bug36/03_fn_defaults.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
# Python 3.6 changes, yet again, the way deafult pairs are handled
1+
# Python 3.6 changes, yet again, the way default pairs are handled
22
def foo1(bar, baz=1):
33
return 1
4+
5+
46
def foo2(bar, baz, qux=1):
57
return 2
8+
9+
610
def foo3(bar, baz=1, qux=2):
711
return 3
12+
13+
814
def foo4(bar, baz, qux=1, quux=2):
915
return 4
1016

17+
1118
# From 3.6 compileall.
1219
# Bug was in omitting default which when used in an "if"
1320
# are treated as False would be
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
# From 3.6 test_abc.py
2-
# Bug was Reciever() class definition
2+
# Bug was Receiver() class definition
33
import abc
44
import unittest
5+
6+
57
class TestABCWithInitSubclass(unittest.TestCase):
68
def test_works_with_init_subclass(self):
79
class ReceivesClassKwargs:
810
def __init_subclass__(cls, **kwargs):
911
super().__init_subclass__()
12+
1013
class Receiver(ReceivesClassKwargs, abc.ABC, x=1, y=2, z=3):
1114
pass
1215

16+
1317
def test_abstractmethod_integration(self):
1418
for abstractthing in [abc.abstractmethod]:
19+
1520
class C(metaclass=abc.ABCMeta):
1621
@abstractthing
17-
def foo(self): pass # abstract
22+
def foo(self):
23+
pass # abstract
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# From 3.6 base64.py
2-
# Bug was handling "and" condition in the presense of POP_JUMP_IF_FALSE
2+
# Bug was handling "and" condition in the presence of POP_JUMP_IF_FALSE
33
# locations
44
def _85encode(foldnuls, words):
5-
return ['z' if foldnuls and word
6-
else 'y'
7-
for word in words]
5+
return ["z" if foldnuls and word else "y" for word in words]
6+
87

98
# From Python 3.6 enum.py
109

10+
1111
def __new__(metacls, cls, bases, classdict):
1212
{k: classdict[k] for k in classdict._member_names}

0 commit comments

Comments
 (0)