Skip to content

Commit 7349060

Browse files
committed
minor proofread
1 parent a42345b commit 7349060

2 files changed

Lines changed: 15 additions & 17 deletions

File tree

pep.rst

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ discussion of potential alternatives :ref:`below <strict-kinds>`.)
551551

552552
Note that in some of these bounds below we write things like
553553
``Literal[int]`` to mean "a literal that is of type ``int``".
554-
We don't propose to add that as actula syntax yet.
554+
We don't propose to add that as actual syntax yet.
555555

556556
.. _boolean-ops:
557557

@@ -660,8 +660,8 @@ Object inspection
660660

661661
* ``MemberQuals = Literal['ClassVar', 'Final', 'NotRequired', 'ReadOnly']`` -
662662
``MemberQuals`` is the type of "qualifiers" that can apply to a
663-
member; currently ``ClassVar`` and ``Final`` apply to classes and
664-
``NotRequired``, and ``ReadOnly`` to typed dicts
663+
member; currently ``ClassVar`` and ``Final`` apply to classes, and
664+
``NotRequired`` and ``ReadOnly`` apply to typed dicts.
665665

666666

667667
Methods are returned as callables using the new ``Param`` based
@@ -1055,9 +1055,8 @@ based on iterating over all attributes.
10551055
*[x for x in typing.Iter[typing.Members[T]]],
10561056
]
10571057

1058-
``UpdateClass`` can then be used to create a
1059-
class decorator (a-la `@dataclass`) adds a new `__init__`` method to a
1060-
class.
1058+
``UpdateClass`` can then be used to create a class decorator (ala
1059+
`@dataclass`) adds a new `__init__`` method to a class.
10611060

10621061
::
10631062

@@ -1069,7 +1068,7 @@ class.
10691068
]:
10701069
pass
10711070

1072-
Or to create a base class (a-la Pydantic) that does.
1071+
Or to create a base class (a la Pydantic) that does.
10731072

10741073
::
10751074

@@ -1279,9 +1278,9 @@ implement an evaluator or use a library for it (the PEP authors are
12791278
planning to produce such a library).
12801279

12811280
Tools that specifically rely on introspecting annotations at runtime
1282-
(tools tha parse Python files are obviously unaffected) that want
1283-
to extract the annotations unevaluated and process
1284-
them in some way are possibly in more trouble. Currently, this is
1281+
(tools that parse Python files are obviously unaffected) that want
1282+
to extract the annotations unevaluated and process them in some way are
1283+
possibly in more trouble. Currently, this is
12851284
doable if ``from __future__ import annotations`` is specified, because
12861285
the string annotation could be parsed with ``ast.parse`` and then handled
12871286
in arbitrary ways.
@@ -1379,7 +1378,7 @@ annotation expression in an arm of a conditional type?
13791378
The main downside of this proposal is just complexity: it requires
13801379
introducing another kind of weird type form.
13811380

1382-
We'd also need to figure out the exact interaction between typeddicts
1381+
We'd also need to figure out the exact interaction between TypedDicts
13831382
and new protocols. Would the dictionary syntax always produce a typed
13841383
dict, and then ``NewProtocol`` converts it to a protocol, or would
13851384
``NewProtocol[<dict type expr>]`` be a special form? Would we try to
@@ -1489,8 +1488,8 @@ limited set of ``<type-bool>`` expressions that can appear in
14891488
conditional types.
14901489

14911490
For better or worse, though, runtime use of type annotations is
1492-
widespread, e.g. ``pydantic`` depends on it, and one of our motivating
1493-
examples (automatically derivin FastAPI CRUD models) depends on it too.
1491+
widespread, e.g. ``pydantic`` depends on it, and one of our motivating
1492+
examples (automatically deriving FastAPI CRUD models) depends on it too.
14941493

14951494
Support TypeScript style pattern matching in subtype checking
14961495
-------------------------------------------------------------

tests/test_dataclass_like.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ class Field[T: FieldArgs](typing.InitField[T]):
8383

8484
"""
8585
86-
``UpdateClass`` can then be used to create a
87-
class decorator (a-la `@dataclass`) adds a new `__init__`` method to a
88-
class.
86+
``UpdateClass`` can then be used to create a class decorator (ala
87+
`@dataclass`) adds a new `__init__`` method to a class.
8988
9089
"""
9190

@@ -101,7 +100,7 @@ def dataclass_ish[T](
101100

102101
"""
103102
104-
Or to create a base class (a-la Pydantic) that does.
103+
Or to create a base class (a la Pydantic) that does.
105104
106105
"""
107106

0 commit comments

Comments
 (0)