Files
typeshed/stdlib/parser.pyi
Shantanu a6d9b83263 Add @final to several more stdlib classes (#7215)
Co-authored-by: hauntsaninja <>
2022-02-14 15:12:40 -08:00

25 lines
1019 B
Python

from _typeshed import StrOrBytesPath
from types import CodeType
from typing import Any, Sequence
from typing_extensions import final
def expr(source: str) -> STType: ...
def suite(source: str) -> STType: ...
def sequence2st(sequence: Sequence[Any]) -> STType: ...
def tuple2st(sequence: Sequence[Any]) -> STType: ...
def st2list(st: STType, line_info: bool = ..., col_info: bool = ...) -> list[Any]: ...
def st2tuple(st: STType, line_info: bool = ..., col_info: bool = ...) -> tuple[Any, ...]: ...
def compilest(st: STType, filename: StrOrBytesPath = ...) -> CodeType: ...
def isexpr(st: STType) -> bool: ...
def issuite(st: STType) -> bool: ...
class ParserError(Exception): ...
@final
class STType:
def compile(self, filename: StrOrBytesPath = ...) -> CodeType: ...
def isexpr(self) -> bool: ...
def issuite(self) -> bool: ...
def tolist(self, line_info: bool = ..., col_info: bool = ...) -> list[Any]: ...
def totuple(self, line_info: bool = ..., col_info: bool = ...) -> tuple[Any, ...]: ...