@@ -36,7 +36,7 @@ system, some libraries come with custom mypy plugins (though then
3636other typecheckers suffer). The case of dataclass-like transformations
3737was considered common enough that a special-case
3838``@dataclass_transform `` decorator was added specifically to cover
39- that case (:pep: `PEP 681 < 681 > `).
39+ that case (:pep: `681 `).
4040
4141We are proposing to add to the type system type manipulation
4242facilities that are more capable of keeping up with dynamic Python
@@ -247,7 +247,7 @@ This kind of pattern is widespread enough that :pep:`PEP 681 <681>`
247247was created to represent a lowest-common denominator subset of what
248248existing libraries do.
249249
250- Make it possible for libraries to implement more of these patterns
250+ Making it possible for libraries to implement more of these patterns
251251directly in the type system will give better typing without needing
252252further special casing, typechecker plugins, hardcoded support, etc.
253253
@@ -258,7 +258,7 @@ More powerful decorator typing
258258
259259The typing of decorator functions has long been a pain point in Python
260260typing. The situation was substantially improved by the introducing of
261- ``ParamSpec `` in :pep: `PEP 612 < 612 > `, but a number of patterns remain
261+ ``ParamSpec `` in :pep: `612 `, but a number of patterns remain
262262unsupported:
263263
264264* Adding/removing/modifying a keyword parameter
@@ -273,7 +273,7 @@ NumPy-style broadcasting
273273------------------------
274274
275275One of the motivations for the introduction of ``TypeVarTuple `` in
276- :pep: `PEP 646 < 646 > ` is to represent the shapes of multi-dimensional
276+ :pep: `646 ` is to represent the shapes of multi-dimensional
277277arrays, such as::
278278
279279 x: Array[float, L[480], L[640]] = Array()
@@ -351,7 +351,7 @@ Then, if we had a call like::
351351
352352the type inferred for ``K `` would be something like::
353353
354- TypedDict({'x': int, y : list[str]})
354+ TypedDict({'x': int, 'y' : list[str]})
355355
356356This is basically a combination of
357357"PEP 692 – Using TypedDict for more precise ``**kwargs `` typing"
@@ -1043,13 +1043,11 @@ contains all the ``Property`` attributes of ``T``.
10431043
10441044::
10451045
1046- type PropsOnly[T] = list[
1047- typing.NewProtocol[
1048- *[
1049- typing.Member[typing.GetName[p], PointerArg[typing.GetType[p]]]
1050- for p in typing.Iter[typing.Attrs[T]]
1051- if typing.IsSub[typing.GetType[p], Property]
1052- ]
1046+ type PropsOnly[T] = typing.NewProtocol[
1047+ *[
1048+ typing.Member[typing.GetName[p], PointerArg[typing.GetType[p]]]
1049+ for p in typing.Iter[typing.Attrs[T]]
1050+ if typing.IsSub[typing.GetType[p], Property]
10531051 ]
10541052 ]
10551053
0 commit comments