1 from collections.abc import Mapping
2 from typing import Tuple
4 class _TokenType(Tuple[str]): # TODO: change to lower-case tuple once new mypy released
5 parent: _TokenType | None
6 def split(self) -> list[_TokenType]: ...
7 subtypes: set[_TokenType]
8 def __init__(self, *args: str) -> None: ...
9 def __contains__(self, val: _TokenType) -> bool: ... # type: ignore
10 def __getattr__(self, name: str) -> _TokenType: ...
11 def __copy__(self): ...
12 def __deepcopy__(self, memo): ...
16 Whitespace: _TokenType
25 Punctuation: _TokenType
30 def is_token_subtype(ttype, other): ...
31 def string_to_tokentype(s): ...
33 # dict, but shouldn't be mutated
34 STANDARD_TYPES: Mapping[_TokenType, str]