mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
follow implementation details of dis.Instruction (#11148)
This commit is contained in:
@@ -48,7 +48,7 @@ if sys.version_info >= (3, 11):
|
||||
end_col_offset: int | None = None
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
class Instruction(NamedTuple):
|
||||
class _Instruction(NamedTuple):
|
||||
opname: str
|
||||
opcode: int
|
||||
arg: int | None
|
||||
@@ -60,7 +60,7 @@ if sys.version_info >= (3, 11):
|
||||
positions: Positions | None = None
|
||||
|
||||
else:
|
||||
class Instruction(NamedTuple):
|
||||
class _Instruction(NamedTuple):
|
||||
opname: str
|
||||
opcode: int
|
||||
arg: int | None
|
||||
@@ -70,6 +70,9 @@ else:
|
||||
starts_line: int | None
|
||||
is_jump_target: bool
|
||||
|
||||
class Instruction(_Instruction):
|
||||
def _disassemble(self, lineno_width: int = 3, mark_as_current: bool = False, offset_width: int = 4) -> str: ...
|
||||
|
||||
class Bytecode:
|
||||
codeobj: types.CodeType
|
||||
first_line: int
|
||||
|
||||
Reference in New Issue
Block a user