Skip to content

Commit 53f7a7c

Browse files
mehanigasvetlov
authored andcommitted
bpo-32297: Few misspellings found in Python source code comments. (#4803)
* Fix multiple typos in code comments * Add spacing in comments (test_logging.py, test_math.py) * Fix spaces at the beginning of comments in test_logging.py
1 parent 5364b5c commit 53f7a7c

39 files changed

+71
-71
lines changed

Doc/includes/email-read-alternative.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
print('From:', msg['from'])
2222
print('Subject:', msg['subject'])
2323

24-
# If we want to print a priview of the message content, we can extract whatever
24+
# If we want to print a preview of the message content, we can extract whatever
2525
# the least formatted payload is and print the first three lines. Of course,
2626
# if the message has no plain text part printing the first three lines of html
2727
# is probably useless, but this is just a conceptual example.

Lib/ctypes/test/test_pep3118.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class Complete(Structure):
188188
(PackedPoint, "B", (), PackedPoint),
189189
(Point2, "T{<l:x:<l:y:}".replace('l', s_long), (), Point2),
190190
(EmptyStruct, "T{}", (), EmptyStruct),
191-
# the pep does't support unions
191+
# the pep doesn't support unions
192192
(aUnion, "B", (), aUnion),
193193
# structure with sub-arrays
194194
(StructWithArrays, "T{(2,3)<l:x:(4)T{<l:x:<l:y:}:y:}".replace('l', s_long), (), StructWithArrays),

Lib/ctypes/test/test_structures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class XX(Structure):
129129
self.assertEqual(sizeof(XX), 0)
130130

131131
def test_fields(self):
132-
# test the offset and size attributes of Structure/Unoin fields.
132+
# test the offset and size attributes of Structure/Union fields.
133133
class X(Structure):
134134
_fields_ = [("x", c_int),
135135
("y", c_char)]

Lib/email/quoprimime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def body_encode(body, maxlinelen=76, eol=NL):
173173
if not body:
174174
return body
175175

176-
# quote speacial characters
176+
# quote special characters
177177
body = body.translate(_QUOPRI_BODY_ENCODE_MAP)
178178

179179
soft_break = '=' + eol

Lib/http/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ def _get_chunk_left(self):
538538
chunk_left = self.chunk_left
539539
if not chunk_left: # Can be 0 or None
540540
if chunk_left is not None:
541-
# We are at the end of chunk. dicard chunk end
541+
# We are at the end of chunk, discard chunk end
542542
self._safe_read(2) # toss the CRLF at the end of the chunk
543543
try:
544544
chunk_left = self._read_next_chunk_size()

Lib/os.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ def spawnve(mode, file, args, env):
891891
otherwise return -SIG, where SIG is the signal that killed it. """
892892
return _spawnvef(mode, file, args, env, execve)
893893

894-
# Note: spawnvp[e] is't currently supported on Windows
894+
# Note: spawnvp[e] isn't currently supported on Windows
895895

896896
def spawnvp(mode, file, args):
897897
"""spawnvp(mode, file, args) -> integer

Lib/tarfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ def frombuf(cls, buf, encoding, errors):
10581058

10591059
# The old GNU sparse format occupies some of the unused
10601060
# space in the buffer for up to 4 sparse structures.
1061-
# Save the them for later processing in _proc_sparse().
1061+
# Save them for later processing in _proc_sparse().
10621062
if obj.type == GNUTYPE_SPARSE:
10631063
pos = 386
10641064
structs = []

Lib/test/_test_multiprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4115,7 +4115,7 @@ def test_noforkbomb(self):
41154115
#
41164116

41174117
class TestForkAwareThreadLock(unittest.TestCase):
4118-
# We recurisvely start processes. Issue #17555 meant that the
4118+
# We recursively start processes. Issue #17555 meant that the
41194119
# after fork registry would get duplicate entries for the same
41204120
# lock. The size of the registry at generation n was ~2**n.
41214121

Lib/test/test_baseexception.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def test_raise_string(self):
163163
self.raise_fails("spam")
164164

165165
def test_catch_non_BaseException(self):
166-
# Tryinng to catch an object that does not inherit from BaseException
166+
# Trying to catch an object that does not inherit from BaseException
167167
# is not allowed.
168168
class NonBaseException(object):
169169
pass

Lib/test/test_class.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ class C:
617617
with self.assertRaisesRegex(TypeError, r'C\(\).__init__\(\) takes no arguments'):
618618
object.__init__(C(), 42)
619619

620-
# Class with both `__init__` & `__new__` method overriden
620+
# Class with both `__init__` & `__new__` method overridden
621621
class D:
622622
def __new__(cls, *args, **kwargs):
623623
super().__new__(cls, *args, **kwargs)

0 commit comments

Comments
 (0)