Use PEP 585 syntax wherever possible (#6717)

This commit is contained in:
Alex Waygood
2021-12-28 10:31:43 +00:00
committed by GitHub
parent e6cb341d94
commit 8d5d2520ac
237 changed files with 966 additions and 1069 deletions

View File

@@ -1,11 +1,11 @@
from lib2to3.pgen2.grammar import Grammar
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, TypeVar, Union
from typing import Any, Callable, Iterator, Optional, TypeVar, Union
_P = TypeVar("_P")
_NL = Union[Node, Leaf]
_Context = Tuple[str, int, int]
_Results = Dict[str, _NL]
_RawNode = Tuple[int, str, _Context, Optional[List[_NL]]]
_Context = tuple[str, int, int]
_Results = dict[str, _NL]
_RawNode = tuple[int, str, _Context, Optional[list[_NL]]]
_Convert = Callable[[Grammar, _RawNode], Any]
HUGE: int