add py2 stubs for dis (by moving them into 2and3) (#1033)

Only a few functions were added in early py3 relative to py2, so it seems
fine to use a single stub. 3.4 made bigger API changes.
This commit is contained in:
Jelle Zijlstra
2017-03-21 06:00:50 -07:00
committed by Matthias Kramm
parent 53a42046cb
commit c8fd85579f

View File

@@ -50,11 +50,12 @@ if sys.version_info >= (3, 4):
COMPILER_FLAG_NAMES = ... # type: Dict[int, str]
def pretty_flags(flags: int) -> str: ...
def findlabels(code: _have_code) -> List[int]: ...
def findlinestarts(code: _have_code) -> Iterator[Tuple[int, int]]: ...
def code_info(x: _have_code_or_string) -> str: ...
if sys.version_info >= (3, 0):
def pretty_flags(flags: int) -> str: ...
def code_info(x: _have_code_or_string) -> str: ...
if sys.version_info >= (3, 4):
def dis(x: _have_code_or_string = ..., *, file: Optional[IO[str]] = ...) -> None: ...
@@ -69,4 +70,6 @@ else:
def distb(tb: types.TracebackType = ...) -> None: ...
def disassemble(co: _have_code, lasti: int = ...) -> None: ...
def disco(co: _have_code, lasti: int = ...) -> None: ...
def show_code(co: _have_code) -> None: ...
if sys.version_info >= (3, 0):
def show_code(co: _have_code) -> None: ...