Skip to content

Commit 5364b2d

Browse files
authored
Doc: Fix typos in documentation and docstring (GH-160743)
(cherry picked from commit dbf9776)
1 parent b241d5e commit 5364b2d

10 files changed

Lines changed: 17 additions & 17 deletions

File tree

‎Doc/c-api/datetime.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ the module initialisation function. The macro puts a pointer to a C structure
1313
into a static variable, :c:data:`PyDateTimeAPI`, that is used by the following
1414
macros.
1515

16-
.. c:macro:: PyDateTime_IMPORT()
16+
.. c:macro:: PyDateTime_IMPORT
1717
1818
Import the datetime C API.
1919

‎Doc/howto/mro.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ straightforward to compute the linearizations of O, X, Y, A and B:
348348

349349
.. code-block:: text
350350
351-
L[O] = 0
351+
L[O] = O
352352
L[X] = X O
353353
L[Y] = Y O
354354
L[A] = A X Y O

‎Doc/library/email.generator.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ To accommodate reproducible processing of SMIME-signed messages
6161

6262
If *maxheaderlen* is not ``None``, refold any header lines that are longer
6363
than *maxheaderlen*, or if ``0``, do not rewrap any headers. If
64-
*manheaderlen* is ``None`` (the default), wrap headers and other message
64+
*maxheaderlen* is ``None`` (the default), wrap headers and other message
6565
lines according to the *policy* settings.
6666

6767
If *policy* is specified, use that policy to control message generation. If
@@ -137,7 +137,7 @@ a serialized binary representation of a message object. For more detail, see
137137
Because strings cannot represent binary data, the :class:`Generator` class must
138138
convert any binary data in any message it flattens to an ASCII compatible
139139
format, by converting them to an ASCII compatible
140-
:mailheader:`Content-Transfer_Encoding`. Using the terminology of the email
140+
:mailheader:`Content-Transfer-Encoding`. Using the terminology of the email
141141
RFCs, you can think of this as :class:`Generator` serializing to an I/O stream
142142
that is not "8 bit clean". In other words, most applications will want
143143
to be using :class:`BytesGenerator`, and not :class:`Generator`.
@@ -162,7 +162,7 @@ to be using :class:`BytesGenerator`, and not :class:`Generator`.
162162

163163
If *maxheaderlen* is not ``None``, refold any header lines that are longer
164164
than *maxheaderlen*, or if ``0``, do not rewrap any headers. If
165-
*manheaderlen* is ``None`` (the default), wrap headers and other message
165+
*maxheaderlen* is ``None`` (the default), wrap headers and other message
166166
lines according to the *policy* settings.
167167

168168
If *policy* is specified, use that policy to control message generation. If
@@ -267,7 +267,7 @@ in with information about the part.
267267

268268
"[Non-text (%(type)s) part of message omitted, filename %(filename)s]"
269269

270-
Optional *_mangle_from_* and *maxheaderlen* are as with the
270+
Optional *mangle_from_* and *maxheaderlen* are as with the
271271
:class:`Generator` base class.
272272

273273

‎Doc/library/email.message.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ message objects.
636636
.. method:: make_mixed(boundary=None)
637637

638638
Convert a non-``multipart``, a ``multipart/related``, or a
639-
``multipart-alternative`` into a ``multipart/mixed``, moving any existing
639+
``multipart/alternative`` into a ``multipart/mixed``, moving any existing
640640
:mailheader:`Content-` headers and payload into a (new) first part of the
641641
``multipart``. If *boundary* is specified, use it as the boundary string
642642
in the multipart, otherwise leave the boundary to be automatically

‎Doc/library/email.policy.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ added matters. To illustrate::
523523
If :attr:`~Policy.cte_type` is ``8bit``, non-ASCII binary data is
524524
converted back
525525
into bytes. Headers with binary data are not refolded, regardless of the
526-
``refold_header`` setting, since there is no way to know whether the
526+
``refold_source`` setting, since there is no way to know whether the
527527
binary data consists of single byte characters or multibyte characters.
528528

529529

‎Doc/library/mailbox.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
495495
.. method:: set_info(key, info)
496496

497497
Set the info of the message corresponding to *key* to *info*.
498-
Calling ``some_mailbox.set_info(key, flags)`` is similar to ::
498+
Calling ``some_mailbox.set_info(key, info)`` is similar to ::
499499

500500
one_message = some_mailbox.get_message(key)
501501
one_message.set_info(info)

‎Doc/library/select.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ https://man.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2
547547
| :const:`KQ_FILTER_AIO` | AIO requests. |
548548
+---------------------------+---------------------------------------------+
549549
| :const:`KQ_FILTER_VNODE` | Returns when one or more of the requested |
550-
| | events watched in *fflag* occurs. |
550+
| | events watched in *fflags* occurs. |
551551
+---------------------------+---------------------------------------------+
552552
| :const:`KQ_FILTER_PROC` | Watch for events on a process ID. |
553553
+---------------------------+---------------------------------------------+

‎Doc/whatsnew/3.10.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,7 @@ Deprecated
16481648
:meth:`~importlib.abc.Loader.exec_module` instead.
16491649
(Contributed by Brett Cannon in :issue:`26131`.)
16501650
1651-
* :meth:`!zimport.zipimporter.load_module` has been deprecated in
1651+
* :meth:`!zipimport.zipimporter.load_module` has been deprecated in
16521652
preference for :meth:`~zipimport.zipimporter.exec_module`.
16531653
(Contributed by Brett Cannon in :issue:`26131`.)
16541654
@@ -1711,8 +1711,8 @@ Deprecated
17111711
(Contributed by Brett Cannon in :issue:`42137`.)
17121712
17131713
* :meth:`!importlib.abc.Loader.module_repr`,
1714-
:meth:`!importlib.machinery.FrozenLoader.module_repr`, and
1715-
:meth:`!importlib.machinery.BuiltinLoader.module_repr` are deprecated and
1714+
:meth:`!importlib.machinery.FrozenImporter.module_repr`, and
1715+
:meth:`!importlib.machinery.BuiltinImporter.module_repr` are deprecated and
17161716
slated for removal in Python 3.12.
17171717
(Contributed by Brett Cannon in :issue:`42136`.)
17181718
@@ -1742,7 +1742,7 @@ Deprecated
17421742
17431743
* ``threading.Thread.setName`` => :attr:`threading.Thread.name`
17441744
1745-
* ``threading.thread.getName`` => :attr:`threading.Thread.name`
1745+
* ``threading.Thread.getName`` => :attr:`threading.Thread.name`
17461746
17471747
* ``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon`
17481748

‎Doc/whatsnew/3.11.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,11 +1904,11 @@ C APIs pending removal are
19041904
* :meth:`!importlib.abc.PathEntryFinder.find_loader`
19051905
* :meth:`!importlib.abc.PathEntryFinder.find_module`
19061906
* :meth:`!importlib.machinery.BuiltinImporter.find_module`
1907-
* :meth:`!importlib.machinery.BuiltinLoader.module_repr`
1907+
* :meth:`!importlib.machinery.BuiltinImporter.module_repr`
19081908
* :meth:`!importlib.machinery.FileFinder.find_loader`
19091909
* :meth:`!importlib.machinery.FileFinder.find_module`
19101910
* :meth:`!importlib.machinery.FrozenImporter.find_module`
1911-
* :meth:`!importlib.machinery.FrozenLoader.module_repr`
1911+
* :meth:`!importlib.machinery.FrozenImporter.module_repr`
19121912
* :meth:`!importlib.machinery.PathFinder.find_module`
19131913
* :meth:`!importlib.machinery.WindowsRegistryFinder.find_module`
19141914
* :func:`!importlib.util.module_for_loader`

‎Lib/email/policy.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def fold_binary(self, name, value):
197197
198198
If cte_type is 8bit, non-ASCII binary data is converted back into
199199
bytes. Headers with binary data are not refolded, regardless of the
200-
refold_header setting, since there is no way to know whether the binary
200+
refold_source setting, since there is no way to know whether the binary
201201
data consists of single byte characters or multibyte characters.
202202
203203
If utf8 is true, headers are encoded to utf8, otherwise to ascii with

0 commit comments

Comments
 (0)