|
| 1 | +from typing import Any, List, Sequence, Text, Tuple, Union |
| 2 | +from types import CodeType |
| 3 | + |
| 4 | +import sys |
| 5 | + |
| 6 | +if sys.version_info >= (3, 6): |
| 7 | + from builtins import _PathLike |
| 8 | + _Path = Union[str, bytes, _PathLike] |
| 9 | +else: |
| 10 | + _Path = Union[str, bytes] |
| 11 | + |
| 12 | +def expr(source: Text) -> STType: ... |
| 13 | +def suite(source: Text) -> STType: ... |
| 14 | +def sequence2st(sequence: Sequence[Any]) -> STType: ... |
| 15 | +def tuple2st(sequence: Sequence[Any]) -> STType: ... |
| 16 | +def st2list(st: STType, line_info: bool = ..., col_info: bool = ...) -> List[Any]: ... |
| 17 | +def st2tuple(st: STType, line_info: bool = ..., col_info: bool = ...) -> Tuple[Any]: ... |
| 18 | +def compilest(st: STType, filename: _Path = ...) -> CodeType: ... |
| 19 | +def isexpr(st: STType) -> bool: ... |
| 20 | +def issuite(st: STType) -> bool: ... |
| 21 | + |
| 22 | +class ParserError(Exception): ... |
| 23 | + |
| 24 | +class STType: |
| 25 | + def compile(self, filename: _Path) -> CodeType: ... |
| 26 | + def isexpr(self) -> bool: ... |
| 27 | + def issuite(self) -> bool: ... |
| 28 | + def tolist(self, line_info: bool = ..., col_info: bool = ...) -> List[Any]: ... |
| 29 | + def totuple(self, line_info: bool = ..., col_info: bool = ...) -> Tuple[Any]: ... |
0 commit comments