Skip to content

Commit d5a7f6b

Browse files
committed
Fix typos in documentation and docstring
1 parent 0e35313 commit d5a7f6b

12 files changed

Lines changed: 21 additions & 21 deletions

File tree

‎Doc/c-api/datetime.rst‎

Lines changed: 2 additions & 2 deletions
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

@@ -51,7 +51,7 @@ macros.
5151
.. versionchanged:: 3.15
5252

5353
This variable should not be accessed directly as direct access is not thread-safe.
54-
Use :c:func:`PyDateTime_IMPORT` instead.
54+
Use :c:macro:`PyDateTime_IMPORT` instead.
5555

5656
.. c:type:: PyDateTime_Date
5757

‎Doc/c-api/function.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ There are a few functions specific to Python functions.
193193
194194
.. versionadded:: 3.12
195195
196-
- ``PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME``
196+
- ``PyFunction_EVENT_MODIFY_QUALNAME``
197197
198198
.. versionadded:: 3.15
199199

‎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
@@ -633,7 +633,7 @@ message objects.
633633
.. method:: make_mixed(boundary=None)
634634

635635
Convert a non-``multipart``, a ``multipart/related``, or a
636-
``multipart-alternative`` into a ``multipart/mixed``, moving any existing
636+
``multipart/alternative`` into a ``multipart/mixed``, moving any existing
637637
:mailheader:`Content-` headers and payload into a (new) first part of the
638638
``multipart``. If *boundary* is specified, use it as the boundary string
639639
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
@@ -535,7 +535,7 @@ added matters. To illustrate::
535535
If :attr:`~Policy.cte_type` is ``8bit``, non-ASCII binary data is
536536
converted back
537537
into bytes. Headers with binary data are not refolded, regardless of the
538-
``refold_header`` setting, since there is no way to know whether the
538+
``refold_source`` setting, since there is no way to know whether the
539539
binary data consists of single byte characters or multibyte characters.
540540

541541

‎Doc/library/mailbox.rst‎

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

502502
Set the info of the message corresponding to *key* to *info*.
503-
Calling ``some_mailbox.set_info(key, flags)`` is similar to ::
503+
Calling ``some_mailbox.set_info(key, info)`` is similar to ::
504504

505505
one_message = some_mailbox.get_message(key)
506506
one_message.set_info(info)

‎Doc/library/select.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ https://man.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2
571571
| :const:`KQ_FILTER_AIO` | AIO requests. |
572572
+---------------------------+---------------------------------------------+
573573
| :const:`KQ_FILTER_VNODE` | Returns when one or more of the requested |
574-
| | events watched in *fflag* occurs. |
574+
| | events watched in *fflags* occurs. |
575575
+---------------------------+---------------------------------------------+
576576
| :const:`KQ_FILTER_PROC` | Watch for events on a process ID. |
577577
+---------------------------+---------------------------------------------+

‎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`

0 commit comments

Comments
 (0)