mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
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:
committed by
Matthias Kramm
parent
53a42046cb
commit
c8fd85579f
@@ -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: ...
|
||||
Reference in New Issue
Block a user