diff --git a/stdlib/2and3/dis.pyi b/stdlib/2and3/dis.pyi index 22630a5b2..682c68516 100644 --- a/stdlib/2and3/dis.pyi +++ b/stdlib/2and3/dis.pyi @@ -55,8 +55,14 @@ 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, 7): + def dis(x: Optional[_have_code_or_string] = ..., *, file: Optional[IO[str]] = ..., depth: Optional[int] = ...) -> None: ... +elif sys.version_info >= (3, 4): + def dis(x: Optional[_have_code_or_string] = ..., *, file: Optional[IO[str]] = ...) -> None: ... +else: + def dis(x: _have_code_or_string = ...) -> None: ... + if sys.version_info >= (3, 4): - def dis(x: _have_code_or_string = ..., *, file: Optional[IO[str]] = ...) -> None: ... def distb(tb: Optional[types.TracebackType] = ..., *, file: Optional[IO[str]] = ...) -> None: ... def disassemble(co: _have_code, lasti: int = ..., *, file: Optional[IO[str]] = ...) -> None: ... def disco(co: _have_code, lasti: int = ..., *, file: Optional[IO[str]] = ...) -> None: ... @@ -64,7 +70,6 @@ if sys.version_info >= (3, 4): def get_instructions(x: _have_code, *, first_line: Optional[int] = ...) -> Iterator[Instruction]: ... else: - def dis(x: _have_code_or_string = ...) -> None: ... def distb(tb: types.TracebackType = ...) -> None: ... def disassemble(co: _have_code, lasti: int = ...) -> None: ... def disco(co: _have_code, lasti: int = ...) -> None: ... diff --git a/tests/stubtest_whitelists/py3_common.txt b/tests/stubtest_whitelists/py3_common.txt index 52652d6f0..dd78a157f 100644 --- a/tests/stubtest_whitelists/py3_common.txt +++ b/tests/stubtest_whitelists/py3_common.txt @@ -167,7 +167,6 @@ dbm.error dbm.ndbm decimal.DecimalException.handle difflib.SequenceMatcher.__init__ -dis.dis distutils.archive_util.make_archive distutils.archive_util.make_tarball distutils.command.bdist_msi