@@ -661,7 +661,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn
661
661
and should not be set on instances of that class. Usage::
662
662
663
663
class Starship:
664
- stats: ClassVar[Dict [str, int]] = {} # class variable
664
+ stats: ClassVar[dict [str, int]] = {} # class variable
665
665
damage: int = 10 # instance variable
666
666
667
667
:data: `ClassVar ` accepts only types and cannot be further subscribed.
@@ -774,10 +774,10 @@ These can be used as types in annotations using ``[]``, each having a unique syn
774
774
* ``Annotated `` can be used with nested and generic aliases::
775
775
776
776
T = TypeVar('T')
777
- Vec = Annotated[List[Tuple [T, T]], MaxLen(10)]
777
+ Vec = Annotated[list[tuple [T, T]], MaxLen(10)]
778
778
V = Vec[int]
779
779
780
- V == Annotated[List[Tuple [int, int]], MaxLen(10)]
780
+ V == Annotated[list[tuple [int, int]], MaxLen(10)]
781
781
782
782
.. versionadded :: 3.9
783
783
@@ -1540,7 +1540,7 @@ Functions and decorators
1540
1540
def process(response: None) -> None:
1541
1541
...
1542
1542
@overload
1543
- def process(response: int) -> Tuple [int, str]:
1543
+ def process(response: int) -> tuple [int, str]:
1544
1544
...
1545
1545
@overload
1546
1546
def process(response: bytes) -> str:
@@ -1679,8 +1679,8 @@ Introspection helpers
1679
1679
.. class :: ForwardRef
1680
1680
1681
1681
A class used for internal typing representation of string forward references.
1682
- For example, ``List ["SomeClass"] `` is implicitly transformed into
1683
- ``List [ForwardRef("SomeClass")] ``. This class should not be instantiated by
1682
+ For example, ``list ["SomeClass"] `` is implicitly transformed into
1683
+ ``list [ForwardRef("SomeClass")] ``. This class should not be instantiated by
1684
1684
a user, but may be used by introspection tools.
1685
1685
1686
1686
Constant
0 commit comments