Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f23530f

Browse files
committed
Issue #22186: Fix typos in Lib/.
Patch by Févry Thibault.
1 parent 0fc08fd commit f23530f

12 files changed

Lines changed: 14 additions & 14 deletions

File tree

Lib/idlelib/idle_test/htest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _wrapper(parent): # htest #
171171
"<nothing> is invalid.\n"
172172
"No modifier key is invalid.\n"
173173
"Shift key with [a-z],[0-9], function key, move key, tab, space"
174-
"is invalid.\nNo validitity checking if advanced key binding "
174+
"is invalid.\nNo validity checking if advanced key binding "
175175
"entry is used."
176176
}
177177

Lib/idlelib/idle_test/mock_tk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _decode(self, index, endflag=0):
116116
"""Return a (line, char) tuple of int indexes into self.data.
117117
118118
This implements .index without converting the result back to a string.
119-
The result is contrained by the number of lines and linelengths of
119+
The result is constrained by the number of lines and linelengths of
120120
self.data. For many indexes, the result is initially (1, 0).
121121
122122
The input index may have any of several possible forms:

Lib/idlelib/idle_test/test_autoexpand.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def test_before_only(self):
7878
equal(previous(), 'a')
7979

8080
def test_after_only(self):
81-
# Also add punctuation 'noise' that shoud be ignored.
81+
# Also add punctuation 'noise' that should be ignored.
8282
text = self.text
8383
previous = self.auto_expand.getprevword
8484
expand = self.auto_expand.expand_word_event

Lib/inspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
# Create constants for the compiler flags in Include/code.h
5151
# We try to get them from dis to avoid duplication, but fall
52-
# back to hardcoding so the dependency is optional
52+
# back to hard-coding so the dependency is optional
5353
try:
5454
from dis import COMPILER_FLAG_NAMES as _flag_names
5555
except ImportError:

Lib/ipaddress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def _prefix_from_ip_int(self, ip_int):
472472
"""Return prefix length from the bitwise netmask.
473473
474474
Args:
475-
ip_int: An integer, the netmask in axpanded bitwise format
475+
ip_int: An integer, the netmask in expanded bitwise format
476476
477477
Returns:
478478
An integer, the prefix length.

Lib/lib2to3/tests/test_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def test_3x_style_invalid_4(self):
9090
self.invalid_syntax("raise E from")
9191

9292

93-
# Adaptated from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef
93+
# Adapted from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef
9494
class TestFunctionAnnotations(GrammarTest):
9595
def test_1(self):
9696
self.validate("""def f(x) -> list: pass""")

Lib/pdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def user_exception(self, frame, exc_info):
301301
# An 'Internal StopIteration' exception is an exception debug event
302302
# issued by the interpreter when handling a subgenerator run with
303303
# 'yield from' or a generator controled by a for loop. No exception has
304-
# actually occured in this case. The debugger uses this debug event to
304+
# actually occurred in this case. The debugger uses this debug event to
305305
# stop when the debuggee is returning from such generators.
306306
prefix = 'Internal ' if (not exc_traceback
307307
and exc_type is StopIteration) else ''

Lib/poplib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class error_proto(Exception): pass
4141
CRLF = CR+LF
4242

4343
# maximal line length when calling readline(). This is to prevent
44-
# reading arbitrary lenght lines. RFC 1939 limits POP3 line length to
44+
# reading arbitrary length lines. RFC 1939 limits POP3 line length to
4545
# 512 characters, including CRLF. We have selected 2048 just to be on
4646
# the safe side.
4747
_MAXLINE = 2048

Lib/ssl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def _dnsname_match(dn, hostname, max_wildcards=1):
213213
wildcards = leftmost.count('*')
214214
if wildcards > max_wildcards:
215215
# Issue #17980: avoid denials of service by refusing more
216-
# than one wildcard per fragment. A survery of established
216+
# than one wildcard per fragment. A survey of established
217217
# policy among SSL implementations showed it to be a
218218
# reasonable choice.
219219
raise CertificateError(

Lib/test/test_asyncio/test_base_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def test_subprocess_exec_invalid_args(self):
371371
self.loop.run_until_complete, self.loop.subprocess_exec,
372372
asyncio.SubprocessProtocol)
373373

374-
# exepected multiple arguments, not a list
374+
# expected multiple arguments, not a list
375375
self.assertRaises(TypeError,
376376
self.loop.run_until_complete, self.loop.subprocess_exec,
377377
asyncio.SubprocessProtocol, args)

0 commit comments

Comments
 (0)