Skip to content

Commit 17b16e1

Browse files
Fix typos in multiple files (GH-26689)
Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 736ed6f commit 17b16e1

24 files changed

+1023
-1023
lines changed

Lib/_aix_support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def aix_platform():
4747
# type: () -> str
4848
"""
4949
AIX filesets are identified by four decimal values: V.R.M.F.
50-
V (version) and R (release) can be retreived using ``uname``
50+
V (version) and R (release) can be retrieved using ``uname``
5151
Since 2007, starting with AIX 5.3 TL7, the M value has been
5252
included with the fileset bos.rte and represents the Technology
5353
Level (TL) of AIX. The F (Fix) value also increases, but is not

Lib/ast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,7 @@ def visit_UnaryOp(self, node):
13341334
operator_precedence = self.unop_precedence[operator]
13351335
with self.require_parens(operator_precedence, node):
13361336
self.write(operator)
1337-
# factor prefixes (+, -, ~) shouldn't be seperated
1337+
# factor prefixes (+, -, ~) shouldn't be separated
13381338
# from the value they belong, (e.g: +1 instead of + 1)
13391339
if operator_precedence is not _Precedence.FACTOR:
13401340
self.write(" ")

Lib/asyncio/proactor_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def resume_reading(self):
221221
length = self._pending_data_length
222222
self._pending_data_length = -1
223223
if length > -1:
224-
# Call the protocol methode after calling _loop_reading(),
224+
# Call the protocol method after calling _loop_reading(),
225225
# since the protocol can decide to pause reading again.
226226
self._loop.call_soon(self._data_received, self._data[:length], length)
227227

Lib/contextlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ async def __aexit__(self, typ, value, traceback):
224224
# was passed to throw() and later wrapped into a RuntimeError
225225
# (see PEP 479 for sync generators; async generators also
226226
# have this behavior). But do this only if the exception wrapped
227-
# by the RuntimeError is actully Stop(Async)Iteration (see
227+
# by the RuntimeError is actually Stop(Async)Iteration (see
228228
# issue29692).
229229
if isinstance(value, (StopIteration, StopAsyncIteration)):
230230
if exc.__cause__ is value:

Lib/dataclasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen,
11001100

11011101

11021102
# _dataclass_getstate and _dataclass_setstate are needed for pickling frozen
1103-
# classes with slots. These could be slighly more performant if we generated
1103+
# classes with slots. These could be slightly more performant if we generated
11041104
# the code instead of iterating over fields. But that can be a project for
11051105
# another day, if performance becomes an issue.
11061106
def _dataclass_getstate(self):

Lib/http/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ def send_head(self):
704704
# The test for this was added in test_httpserver.py
705705
# However, some OS platforms accept a trailingSlash as a filename
706706
# See discussion on python-dev and Issue34711 regarding
707-
# parseing and rejection of filenames with a trailing slash
707+
# parsing and rejection of filenames with a trailing slash
708708
if path.endswith("/"):
709709
self.send_error(HTTPStatus.NOT_FOUND, "File not found")
710710
return None

Lib/idlelib/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
default values. For 'highlight' and 'keys', user sections augment the
1717
default sections (and must, therefore, have distinct names).
1818
19-
Throughout this module there is an emphasis on returning useable defaults
19+
Throughout this module there is an emphasis on returning usable defaults
2020
when a problem occurs in returning a requested configuration value back to
2121
idle. This is to allow IDLE to continue to function in spite of errors in
2222
the retrieval of config information. When a default is returned instead of

Lib/idlelib/history.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, text):
2929
text.bind("<<history-next>>", self.history_next)
3030

3131
def history_next(self, event):
32-
"Fetch later statement; start with ealiest if cyclic."
32+
"Fetch later statement; start with earliest if cyclic."
3333
self.fetch(reverse=False)
3434
return "break"
3535

Lib/importlib/_bootstrap_external.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ def __hash__(self):
11781178
return hash(self.name) ^ hash(self.path)
11791179

11801180
def create_module(self, spec):
1181-
"""Create an unitialized extension module"""
1181+
"""Create an uninitialized extension module"""
11821182
module = _bootstrap._call_with_frames_removed(
11831183
_imp.create_dynamic, spec)
11841184
_bootstrap._verbose_message('extension module {!r} loaded from {!r}',

Lib/multiprocessing/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ def wait(object_list, timeout=None):
943943
return ready
944944

945945
#
946-
# Make connection and socket objects sharable if possible
946+
# Make connection and socket objects shareable if possible
947947
#
948948

949949
if sys.platform == 'win32':

Lib/platform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
If called from the command line, it prints the platform
77
information concatenated as single string to stdout. The output
8-
format is useable as part of a filename.
8+
format is usable as part of a filename.
99
1010
"""
1111
# This module is maintained by Marc-Andre Lemburg <[email protected]>.
@@ -169,7 +169,7 @@ def libc_ver(executable=None, lib='', version='', chunksize=16384):
169169
170170
Note that the function has intimate knowledge of how different
171171
libc versions add symbols to the executable and thus is probably
172-
only useable for executables compiled using gcc.
172+
only usable for executables compiled using gcc.
173173
174174
The file is read and scanned in chunks of chunksize bytes.
175175

Lib/plistlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ def parse(self, fileobj):
177177
return self.root
178178

179179
def handle_entity_decl(self, entity_name, is_parameter_entity, value, base, system_id, public_id, notation_name):
180-
# Reject plist files with entity declarations to avoid XML vulnerabilies in expat.
181-
# Regular plist files don't contain those declerations, and Apple's plutil tool does not
180+
# Reject plist files with entity declarations to avoid XML vulnerabilities in expat.
181+
# Regular plist files don't contain those declarations, and Apple's plutil tool does not
182182
# accept them either.
183183
raise InvalidFileException("XML entity declarations are not supported in plist files")
184184

Lib/pstats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def print_line(self, func): # hack: should print percentages
522522
class TupleComp:
523523
"""This class provides a generic function for comparing any two tuples.
524524
Each instance records a list of tuple-indices (from most significant
525-
to least significant), and sort direction (ascending or decending) for
525+
to least significant), and sort direction (ascending or descending) for
526526
each tuple-index. The compare functions can then be used as the function
527527
argument to the system sort() function when a list of tuples need to be
528528
sorted in the instances order."""

Lib/socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
socketpair() -- create a pair of new socket objects [*]
1414
fromfd() -- create a socket object from an open file descriptor [*]
1515
send_fds() -- Send file descriptor to the socket.
16-
recv_fds() -- Recieve file descriptors from the socket.
16+
recv_fds() -- Receive file descriptors from the socket.
1717
fromshare() -- create a socket object from data received from socket.share() [*]
1818
gethostname() -- return the current hostname
1919
gethostbyname() -- map a hostname to its IP number

Lib/ssl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def _ipaddress_match(cert_ipaddress, host_ip):
368368
(section 1.7.2 - "Out of Scope").
369369
"""
370370
# OpenSSL may add a trailing newline to a subjectAltName's IP address,
371-
# commonly woth IPv6 addresses. Strip off trailing \n.
371+
# commonly with IPv6 addresses. Strip off trailing \n.
372372
ip = _inet_paton(cert_ipaddress.rstrip())
373373
return ip == host_ip
374374

Lib/subprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2086,7 +2086,7 @@ def send_signal(self, sig):
20862086
try:
20872087
os.kill(self.pid, sig)
20882088
except ProcessLookupError:
2089-
# Supress the race condition error; bpo-40550.
2089+
# Suppress the race condition error; bpo-40550.
20902090
pass
20912091

20922092
def terminate(self):

Lib/symtable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __repr__(self):
6262
def get_type(self):
6363
"""Return the type of the symbol table.
6464
65-
The values retuned are 'class', 'module' and
65+
The values returned are 'class', 'module' and
6666
'function'.
6767
"""
6868
if self._table.type == _symtable.TYPE_MODULE:
@@ -245,7 +245,7 @@ def is_parameter(self):
245245
return bool(self.__flags & DEF_PARAM)
246246

247247
def is_global(self):
248-
"""Return *True* if the sysmbol is global.
248+
"""Return *True* if the symbol is global.
249249
"""
250250
return bool(self.__scope in (GLOBAL_IMPLICIT, GLOBAL_EXPLICIT)
251251
or (self.__module_scope and self.__flags & DEF_BOUND))

Lib/test/test_descr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5696,7 +5696,7 @@ class C(A):
56965696

56975697
def test_incomplete_extend(self):
56985698
"""
5699-
Extending an unitialized type with type->tp_mro == NULL must
5699+
Extending an uninitialized type with type->tp_mro == NULL must
57005700
throw a reasonable TypeError exception, instead of failing
57015701
with PyErr_BadInternalCall.
57025702
"""

Lib/turtle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3826,7 +3826,7 @@ def write_docstringdict(filename="turtle_docstringdict"):
38263826
default value is turtle_docstringdict
38273827
38283828
Has to be called explicitly, (not used by the turtle-graphics classes)
3829-
The docstring dictionary will be written to the Python script <filname>.py
3829+
The docstring dictionary will be written to the Python script <filename>.py
38303830
It is intended to serve as a template for translation of the docstrings
38313831
into different languages.
38323832
"""

Lib/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class DynamicClassAttribute:
158158
attributes on the class with the same name. (Enum used this between Python
159159
versions 3.4 - 3.9 .)
160160
161-
Subclass from this to use a different method of accessing virtual atributes
161+
Subclass from this to use a different method of accessing virtual attributes
162162
and still be treated properly by the inspect module. (Enum uses this since
163163
Python 3.10 .)
164164

Lib/unittest/mock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ async def _execute_mock_call(self, /, *args, **kwargs):
22052205
try:
22062206
result = next(effect)
22072207
except StopIteration:
2208-
# It is impossible to propogate a StopIteration
2208+
# It is impossible to propagate a StopIteration
22092209
# through coroutines because of PEP 479
22102210
raise StopAsyncIteration
22112211
if _is_exception(result):

Parser/tokenizer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,12 +1187,12 @@ static int
11871187
verify_end_of_number(struct tok_state *tok, int c, const char *kind)
11881188
{
11891189
/* Emit a deprecation warning only if the numeric literal is immediately
1190-
* followed by one of keywords which can occurr after a numeric literal
1190+
* followed by one of keywords which can occur after a numeric literal
11911191
* in valid code: "and", "else", "for", "if", "in", "is" and "or".
11921192
* It allows to gradually deprecate existing valid code without adding
11931193
* warning before error in most cases of invalid numeric literal (which
1194-
* would be confusiong and break existing tests).
1195-
* Raise a syntax error with slighly better message than plain
1194+
* would be confusing and break existing tests).
1195+
* Raise a syntax error with slightly better message than plain
11961196
* "invalid syntax" if the numeric literal is immediately followed by
11971197
* other keyword or identifier.
11981198
*/

0 commit comments

Comments
 (0)