mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Use TypeAlias where possible for type aliases (#7630)
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
from _typeshed import Self
|
||||
from lib2to3.pgen2.grammar import Grammar
|
||||
from typing import Any, Callable, Iterator
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
_NL = Node | Leaf
|
||||
_Context = tuple[str, int, int]
|
||||
_Results = dict[str, _NL]
|
||||
_RawNode = tuple[int, str, _Context, list[_NL] | None]
|
||||
_Convert = Callable[[Grammar, _RawNode], Any]
|
||||
_NL: TypeAlias = Node | Leaf
|
||||
_Context: TypeAlias = tuple[str, int, int]
|
||||
_Results: TypeAlias = dict[str, _NL]
|
||||
_RawNode: TypeAlias = tuple[int, str, _Context, list[_NL] | None]
|
||||
_Convert: TypeAlias = Callable[[Grammar, _RawNode], Any]
|
||||
|
||||
HUGE: int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user