1 # Stubs for py_compile (Python 2 and 3)
\r
4 from typing import Optional, List, Text, AnyStr, Union
\r
6 _EitherStr = Union[bytes, Text]
\r
8 class PyCompileError(Exception):
\r
9 exc_type_name = ... # type: str
\r
10 exc_value = ... # type: BaseException
\r
11 file = ... # type: str
\r
12 msg = ... # type: str
\r
13 def __init__(self, exc_type: str, exc_value: BaseException, file: str, msg: str = ...) -> None: ...
\r
15 if sys.version_info >= (3, 2):
\r
16 def compile(file: AnyStr, cfile: Optional[AnyStr] = ..., dfile: Optional[AnyStr] = ..., doraise: bool = ..., optimize: int = ...) -> Optional[AnyStr]: ...
\r
18 def compile(file: _EitherStr, cfile: Optional[_EitherStr] = ..., dfile: Optional[_EitherStr] = ..., doraise: bool = ...) -> None: ...
\r
20 def main(args: Optional[List[Text]] = ...) -> int: ...
\r