mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-23 18:18:37 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
from _typeshed import StrPath
|
||||
from typing import Dict, List, Optional, Tuple, TypeVar
|
||||
from typing import Optional, TypeVar
|
||||
|
||||
_P = TypeVar("_P")
|
||||
_Label = Tuple[int, Optional[str]]
|
||||
_DFA = List[List[Tuple[int, int]]]
|
||||
_DFAS = Tuple[_DFA, Dict[int, int]]
|
||||
_Label = tuple[int, Optional[str]]
|
||||
_DFA = list[list[tuple[int, int]]]
|
||||
_DFAS = tuple[_DFA, dict[int, int]]
|
||||
|
||||
class Grammar:
|
||||
symbol2number: dict[str, int]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from lib2to3.pgen2.token import * # noqa
|
||||
from typing import Callable, Iterable, Iterator, Tuple
|
||||
from typing import Callable, Iterable, Iterator
|
||||
|
||||
_Coord = Tuple[int, int]
|
||||
_Coord = tuple[int, int]
|
||||
_TokenEater = Callable[[int, str, _Coord, _Coord, str], None]
|
||||
_TokenInfo = Tuple[int, str, _Coord, _Coord, str]
|
||||
_TokenInfo = tuple[int, str, _Coord, _Coord, str]
|
||||
|
||||
class TokenError(Exception): ...
|
||||
class StopTokenizing(Exception): ...
|
||||
|
||||
Reference in New Issue
Block a user