Skip to content

Commit 71eb153

Browse files
committed
Minor cleaning
1 parent b0fffe5 commit 71eb153

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

peps/pep-0821.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Semantics
9595
This respectively applies to ``TypedDict`` with ``total=False``.
9696
* Functions with ``**kwargs`` are compatible if the annotation of ``**kwargs``
9797
matches or is a supertype of the ``TypedDict`` values.
98-
* ``extra_items`` from PEP 728 is respected: functions accepting additional
98+
* ``extra_items`` from :pep:`728` is respected: functions accepting additional
9999
``**kwargs`` are valid if their annotation is compatible with the declared
100100
type.
101101
* If neither ``extra_items`` nor ``closed`` (:pep:`728`) is specified on the
@@ -114,7 +114,7 @@ The following examples illustrate how unpacking a ``TypedDict`` into a
114114
``Callable`` enforces acceptance of specific keyword parameters. A function is
115115
compatible if it can be called with the required keywords (even if they are
116116
also accepted positionally); positional-only parameters for those keys are
117-
rejected.::
117+
rejected::
118118

119119
from typing import TypedDict, Callable, Unpack, Any, NotRequired
120120

@@ -261,19 +261,20 @@ rejected::
261261
m2: IntKwPosCallable = mixed_poskw # Accepted
262262
m3: IntKwPosCallable = mixed_posonly # Rejected
263263

264-
Inline ``TypedDicts`` (:pep:`764`):
264+
Inline ``TypedDicts`` (PEP 764)
265+
-------------------------------
265266

266267
Inline ``TypedDict`` forms are supported like any other ``TypedDict``, allowing
267-
compact definitions when the structure is used only once::
268+
compact definitions::
268269

269-
Callable[[Unpack[TypedDict({"a": int})]], Any]
270+
Callable[Unpack[TypedDict({"a": int})], Any]
270271

271272

272273
Backwards Compatibility
273274
=======================
274275

275-
This feature is additive. Existing code is unaffected. Runtime behavior does
276-
not change; this is a typing-only feature.
276+
This feature is an additive typing-only feature.
277+
Existing code is unaffected; runtime behavior does not change.
277278

278279
How to Teach This
279280
=================
@@ -285,7 +286,7 @@ taught that with ::
285286
a: int
286287
b: NotRequired[str]
287288

288-
* ``Callable[[Unpack[Signature]], R]`` is equivalent to defining a Protocol with
289+
* ``Callable[Unpack[Signature], R]`` is equivalent to defining a Protocol with
289290
``__call__(self, **kwargs: Unpack[Signature]) -> R``
290291
or
291292
``__call__(self, a: int, b: str = ..., **kwargs: object) -> R``.

0 commit comments

Comments
 (0)