follow implementation details of dis.Instruction (#11148)

This commit is contained in:
Stephen Morton
2023-12-11 10:48:06 -08:00
committed by GitHub
parent fd558f8acf
commit 7ba83f3055

View File

@@ -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