Use PEP 604 syntax wherever possible (#7493)

This commit is contained in:
Alex Waygood
2022-03-16 15:01:33 +00:00
committed by GitHub
parent 15e21a8dc1
commit 3ab250eec8
174 changed files with 472 additions and 490 deletions

View File

@@ -1,9 +1,9 @@
from _typeshed import Self
from lib2to3.pgen2.grammar import Grammar
from typing import Any, Callable, Iterator, Optional, Text, TypeVar, Union
from typing import Any, Callable, Iterator, Optional, Text, TypeVar
_P = TypeVar("_P")
_NL = Union[Node, Leaf]
_NL = Node | Leaf
_Context = tuple[Text, int, int]
_Results = dict[Text, _NL]
_RawNode = tuple[int, Text, _Context, Optional[list[_NL]]]