Skip to content

Commit f54a368

Browse files
Apply suggestions from Jelle
1 parent b3e2c90 commit f54a368

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Doc/library/typing.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,6 @@ These can be used as types in annotations. They all support subscription using
13681368
T1 = Annotated[int, ValueRange(-10, 5)]
13691369
T2 = Annotated[T1, ValueRange(-20, 3)]
13701370

1371-
``Annotated`` must be subscripted with at least two arguments.
13721371
The first argument to ``Annotated`` must be a valid type. Multiple metadata
13731372
elements can be supplied as ``Annotated`` supports variadic arguments. The
13741373
order of the metadata elements is preserved and matters for equality checks::
@@ -1418,7 +1417,7 @@ These can be used as types in annotations. They all support subscription using
14181417

14191418
type Variadic[*Ts] = Annotated[*Ts, Ann1] = Annotated[T1, T2, T3, ..., Ann1] # NOT valid
14201419

1421-
where ``T1``, ``T2``,... are :class:`TypeVars <TypeVar>`. This is invalid as
1420+
where ``T1``, ``T2``, ... are :class:`TypeVars <TypeVar>`. This is invalid as
14221421
only one type should be passed to Annotated.
14231422

14241423
By default, :func:`get_type_hints` strips the metadata from annotations.

0 commit comments

Comments
 (0)