mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-26 21:08:59 +08:00
Update dis.pyi and opcode.pyi for Python3.12 (#10276)
This commit is contained in:
@@ -29,9 +29,12 @@ __all__ = [
|
||||
"opmap",
|
||||
"HAVE_ARGUMENT",
|
||||
"EXTENDED_ARG",
|
||||
"hasnargs",
|
||||
"stack_effect",
|
||||
]
|
||||
if sys.version_info >= (3, 12):
|
||||
__all__ += ["hasarg", "hasexc"]
|
||||
else:
|
||||
__all__ += ["hasnargs"]
|
||||
|
||||
# Strictly this should not have to include Callable, but mypy doesn't use FunctionType
|
||||
# for functions (python/mypy#3171)
|
||||
|
||||
@@ -14,9 +14,12 @@ __all__ = [
|
||||
"opmap",
|
||||
"HAVE_ARGUMENT",
|
||||
"EXTENDED_ARG",
|
||||
"hasnargs",
|
||||
"stack_effect",
|
||||
]
|
||||
if sys.version_info >= (3, 12):
|
||||
__all__ += ["hasarg", "hasexc"]
|
||||
else:
|
||||
__all__ += ["hasnargs"]
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
cmp_op: tuple[Literal["<"], Literal["<="], Literal["=="], Literal["!="], Literal[">"], Literal[">="]]
|
||||
@@ -42,6 +45,11 @@ hasjabs: list[int]
|
||||
haslocal: list[int]
|
||||
hascompare: list[int]
|
||||
hasfree: list[int]
|
||||
if sys.version_info >= (3, 12):
|
||||
hasarg: list[int]
|
||||
hasexc: list[int]
|
||||
else:
|
||||
hasnargs: list[int]
|
||||
opname: list[str]
|
||||
|
||||
opmap: dict[str, int]
|
||||
@@ -53,5 +61,3 @@ if sys.version_info >= (3, 8):
|
||||
|
||||
else:
|
||||
def stack_effect(__opcode: int, __oparg: int | None = None) -> int: ...
|
||||
|
||||
hasnargs: list[int]
|
||||
|
||||
@@ -25,10 +25,6 @@ configparser.RawConfigParser.readfp
|
||||
configparser.__all__
|
||||
ctypes.c_time_t
|
||||
datetime.__all__
|
||||
dis.__all__
|
||||
dis.hasarg
|
||||
dis.hasexc
|
||||
dis.hasnargs
|
||||
email.utils.localtime
|
||||
enum.Enum.__signature__
|
||||
enum.EnumMeta.__call__
|
||||
@@ -87,10 +83,6 @@ multiprocessing.queues.Queue.__class_getitem__
|
||||
ntpath.__all__
|
||||
ntpath.isjunction
|
||||
ntpath.splitroot
|
||||
opcode.__all__
|
||||
opcode.hasarg
|
||||
opcode.hasexc
|
||||
opcode.hasnargs
|
||||
os.DirEntry.is_junction
|
||||
os.path.__all__
|
||||
os.path.isjunction
|
||||
|
||||
Reference in New Issue
Block a user