Fix typos in multiple files (GH-26689)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Binbin 2021-06-13 10:47:44 +08:00 committed by GitHub
parent 736ed6f7a9
commit 17b16e13bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 1023 additions and 1023 deletions

View file

@ -47,7 +47,7 @@ def aix_platform():
# type: () -> str
"""
AIX filesets are identified by four decimal values: V.R.M.F.
V (version) and R (release) can be retreived using ``uname``
V (version) and R (release) can be retrieved using ``uname``
Since 2007, starting with AIX 5.3 TL7, the M value has been
included with the fileset bos.rte and represents the Technology
Level (TL) of AIX. The F (Fix) value also increases, but is not

View file

@ -1334,7 +1334,7 @@ def visit_UnaryOp(self, node):
operator_precedence = self.unop_precedence[operator]
with self.require_parens(operator_precedence, node):
self.write(operator)
# factor prefixes (+, -, ~) shouldn't be seperated
# factor prefixes (+, -, ~) shouldn't be separated
# from the value they belong, (e.g: +1 instead of + 1)
if operator_precedence is not _Precedence.FACTOR:
self.write(" ")

View file

@ -221,7 +221,7 @@ def resume_reading(self):
length = self._pending_data_length
self._pending_data_length = -1
if length > -1:
# Call the protocol methode after calling _loop_reading(),
# Call the protocol method after calling _loop_reading(),
# since the protocol can decide to pause reading again.
self._loop.call_soon(self._data_received, self._data[:length], length)

View file

@ -224,7 +224,7 @@ async def __aexit__(self, typ, value, traceback):
# was passed to throw() and later wrapped into a RuntimeError
# (see PEP 479 for sync generators; async generators also
# have this behavior). But do this only if the exception wrapped
# by the RuntimeError is actully Stop(Async)Iteration (see
# by the RuntimeError is actually Stop(Async)Iteration (see
# issue29692).
if isinstance(value, (StopIteration, StopAsyncIteration)):
if exc.__cause__ is value:

View file

@ -1100,7 +1100,7 @@ def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen,
# _dataclass_getstate and _dataclass_setstate are needed for pickling frozen
# classes with slots. These could be slighly more performant if we generated
# classes with slots. These could be slightly more performant if we generated
# the code instead of iterating over fields. But that can be a project for
# another day, if performance becomes an issue.
def _dataclass_getstate(self):

View file

@ -704,7 +704,7 @@ def send_head(self):
# The test for this was added in test_httpserver.py
# However, some OS platforms accept a trailingSlash as a filename
# See discussion on python-dev and Issue34711 regarding
# parseing and rejection of filenames with a trailing slash
# parsing and rejection of filenames with a trailing slash
if path.endswith("/"):
self.send_error(HTTPStatus.NOT_FOUND, "File not found")
return None

View file

@ -16,7 +16,7 @@
default values. For 'highlight' and 'keys', user sections augment the
default sections (and must, therefore, have distinct names).
Throughout this module there is an emphasis on returning useable defaults
Throughout this module there is an emphasis on returning usable defaults
when a problem occurs in returning a requested configuration value back to
idle. This is to allow IDLE to continue to function in spite of errors in
the retrieval of config information. When a default is returned instead of

View file

@ -29,7 +29,7 @@ def __init__(self, text):
text.bind("<<history-next>>", self.history_next)
def history_next(self, event):
"Fetch later statement; start with ealiest if cyclic."
"Fetch later statement; start with earliest if cyclic."
self.fetch(reverse=False)
return "break"

View file

@ -1178,7 +1178,7 @@ def __hash__(self):
return hash(self.name) ^ hash(self.path)
def create_module(self, spec):
"""Create an unitialized extension module"""
"""Create an uninitialized extension module"""
module = _bootstrap._call_with_frames_removed(
_imp.create_dynamic, spec)
_bootstrap._verbose_message('extension module {!r} loaded from {!r}',

View file

@ -943,7 +943,7 @@ def wait(object_list, timeout=None):
return ready
#
# Make connection and socket objects sharable if possible
# Make connection and socket objects shareable if possible
#
if sys.platform == 'win32':

View file

@ -5,7 +5,7 @@
If called from the command line, it prints the platform
information concatenated as single string to stdout. The output
format is useable as part of a filename.
format is usable as part of a filename.
"""
# This module is maintained by Marc-Andre Lemburg <mal@egenix.com>.
@ -169,7 +169,7 @@ def libc_ver(executable=None, lib='', version='', chunksize=16384):
Note that the function has intimate knowledge of how different
libc versions add symbols to the executable and thus is probably
only useable for executables compiled using gcc.
only usable for executables compiled using gcc.
The file is read and scanned in chunks of chunksize bytes.

View file

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

View file

@ -522,7 +522,7 @@ def print_line(self, func): # hack: should print percentages
class TupleComp:
"""This class provides a generic function for comparing any two tuples.
Each instance records a list of tuple-indices (from most significant
to least significant), and sort direction (ascending or decending) for
to least significant), and sort direction (ascending or descending) for
each tuple-index. The compare functions can then be used as the function
argument to the system sort() function when a list of tuples need to be
sorted in the instances order."""

View file

@ -13,7 +13,7 @@
socketpair() -- create a pair of new socket objects [*]
fromfd() -- create a socket object from an open file descriptor [*]
send_fds() -- Send file descriptor to the socket.
recv_fds() -- Recieve file descriptors from the socket.
recv_fds() -- Receive file descriptors from the socket.
fromshare() -- create a socket object from data received from socket.share() [*]
gethostname() -- return the current hostname
gethostbyname() -- map a hostname to its IP number

View file

@ -368,7 +368,7 @@ def _ipaddress_match(cert_ipaddress, host_ip):
(section 1.7.2 - "Out of Scope").
"""
# OpenSSL may add a trailing newline to a subjectAltName's IP address,
# commonly woth IPv6 addresses. Strip off trailing \n.
# commonly with IPv6 addresses. Strip off trailing \n.
ip = _inet_paton(cert_ipaddress.rstrip())
return ip == host_ip

View file

@ -2086,7 +2086,7 @@ def send_signal(self, sig):
try:
os.kill(self.pid, sig)
except ProcessLookupError:
# Supress the race condition error; bpo-40550.
# Suppress the race condition error; bpo-40550.
pass
def terminate(self):

View file

@ -62,7 +62,7 @@ def __repr__(self):
def get_type(self):
"""Return the type of the symbol table.
The values retuned are 'class', 'module' and
The values returned are 'class', 'module' and
'function'.
"""
if self._table.type == _symtable.TYPE_MODULE:
@ -245,7 +245,7 @@ def is_parameter(self):
return bool(self.__flags & DEF_PARAM)
def is_global(self):
"""Return *True* if the sysmbol is global.
"""Return *True* if the symbol is global.
"""
return bool(self.__scope in (GLOBAL_IMPLICIT, GLOBAL_EXPLICIT)
or (self.__module_scope and self.__flags & DEF_BOUND))

View file

@ -5696,7 +5696,7 @@ class C(A):
def test_incomplete_extend(self):
"""
Extending an unitialized type with type->tp_mro == NULL must
Extending an uninitialized type with type->tp_mro == NULL must
throw a reasonable TypeError exception, instead of failing
with PyErr_BadInternalCall.
"""

View file

@ -3826,7 +3826,7 @@ def write_docstringdict(filename="turtle_docstringdict"):
default value is turtle_docstringdict
Has to be called explicitly, (not used by the turtle-graphics classes)
The docstring dictionary will be written to the Python script <filname>.py
The docstring dictionary will be written to the Python script <filename>.py
It is intended to serve as a template for translation of the docstrings
into different languages.
"""

View file

@ -158,7 +158,7 @@ class DynamicClassAttribute:
attributes on the class with the same name. (Enum used this between Python
versions 3.4 - 3.9 .)
Subclass from this to use a different method of accessing virtual atributes
Subclass from this to use a different method of accessing virtual attributes
and still be treated properly by the inspect module. (Enum uses this since
Python 3.10 .)

View file

@ -2205,7 +2205,7 @@ async def _execute_mock_call(self, /, *args, **kwargs):
try:
result = next(effect)
except StopIteration:
# It is impossible to propogate a StopIteration
# It is impossible to propagate a StopIteration
# through coroutines because of PEP 479
raise StopAsyncIteration
if _is_exception(result):

View file

@ -1187,12 +1187,12 @@ static int
verify_end_of_number(struct tok_state *tok, int c, const char *kind)
{
/* Emit a deprecation warning only if the numeric literal is immediately
* followed by one of keywords which can occurr after a numeric literal
* followed by one of keywords which can occur after a numeric literal
* in valid code: "and", "else", "for", "if", "in", "is" and "or".
* It allows to gradually deprecate existing valid code without adding
* warning before error in most cases of invalid numeric literal (which
* would be confusiong and break existing tests).
* Raise a syntax error with slighly better message than plain
* would be confusing and break existing tests).
* Raise a syntax error with slightly better message than plain
* "invalid syntax" if the numeric literal is immediately followed by
* other keyword or identifier.
*/

File diff suppressed because it is too large Load diff

View file

@ -128,21 +128,21 @@ VERSION=PYTHON_VERSION
AC_SUBST(SOVERSION)
SOVERSION=1.0
# The later defininition of _XOPEN_SOURCE disables certain features
# The later definition of _XOPEN_SOURCE disables certain features
# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
AC_DEFINE(_GNU_SOURCE, 1, [Define on Linux to activate all library features])
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# The later definition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
# them.
AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# The later definition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
# them.
AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# The later definition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
# them.
AC_DEFINE(_DARWIN_C_SOURCE, 1, [Define on Darwin to activate all library features])