mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
* bump pyre version * make sure CI-pyre uses working copy * remove unused pyre suppressions * suppress invalid decorations * fix undefined attributes * fix missing return annotations * fix tuple concatenation issues * add native stubs * fix invalid typing of **kwargs in test_apply_type_annotations * only install pyre on non-windows * update test fixture to reflect changes in recent pyre versions * suppress errors related to mismatched positions
95 lines
1.7 KiB
Python
95 lines
1.7 KiB
Python
from token import (
|
|
AMPER,
|
|
AMPEREQUAL,
|
|
AT,
|
|
ATEQUAL,
|
|
CIRCUMFLEX,
|
|
CIRCUMFLEXEQUAL,
|
|
COLON,
|
|
COLONEQUAL,
|
|
COMMA,
|
|
COMMENT,
|
|
DEDENT,
|
|
DOT,
|
|
DOUBLESLASH,
|
|
DOUBLESLASHEQUAL,
|
|
DOUBLESTAR,
|
|
DOUBLESTAREQUAL,
|
|
ELLIPSIS,
|
|
ENCODING,
|
|
ENDMARKER,
|
|
EQEQUAL,
|
|
EQUAL,
|
|
ERRORTOKEN,
|
|
EXACT_TOKEN_TYPES,
|
|
GREATER,
|
|
GREATEREQUAL,
|
|
INDENT,
|
|
LBRACE,
|
|
LEFTSHIFT,
|
|
LEFTSHIFTEQUAL,
|
|
LESS,
|
|
LESSEQUAL,
|
|
LPAR,
|
|
LSQB,
|
|
MINEQUAL,
|
|
MINUS,
|
|
N_TOKENS,
|
|
NAME,
|
|
NEWLINE,
|
|
NL,
|
|
NOTEQUAL,
|
|
NT_OFFSET,
|
|
NUMBER,
|
|
OP,
|
|
PERCENT,
|
|
PERCENTEQUAL,
|
|
PLUS,
|
|
PLUSEQUAL,
|
|
RARROW,
|
|
RBRACE,
|
|
RIGHTSHIFT,
|
|
RIGHTSHIFTEQUAL,
|
|
RPAR,
|
|
RSQB,
|
|
SEMI,
|
|
SLASH,
|
|
SLASHEQUAL,
|
|
STAR,
|
|
STAREQUAL,
|
|
STRING,
|
|
TILDE,
|
|
TYPE_COMMENT,
|
|
TYPE_IGNORE,
|
|
VBAR,
|
|
VBAREQUAL,
|
|
)
|
|
from typing import Callable, Generator, Sequence, Tuple
|
|
|
|
Hexnumber: str = ...
|
|
Binnumber: str = ...
|
|
Octnumber: str = ...
|
|
Decnumber: str = ...
|
|
Intnumber: str = ...
|
|
Exponent: str = ...
|
|
Pointfloat: str = ...
|
|
Expfloat: str = ...
|
|
Floatnumber: str = ...
|
|
Imagnumber: str = ...
|
|
Number: str = ...
|
|
Whitespace: str = ...
|
|
Comment: str = ...
|
|
Ignore: str = ...
|
|
Name: str = ...
|
|
|
|
class TokenInfo(Tuple[int, str, Tuple[int, int], Tuple[int, int], int]):
|
|
exact_type: int = ...
|
|
type: int = ...
|
|
string: str = ...
|
|
start: Tuple[int, int] = ...
|
|
end: Tuple[int, int] = ...
|
|
line: int = ...
|
|
def __repr__(self) -> str: ...
|
|
|
|
def detect_encoding(readline: Callable[[], bytes]) -> Tuple[str, Sequence[bytes]]: ...
|
|
def tokenize(readline: Callable[[], bytes]) -> Generator[TokenInfo, None, None]: ...
|