Add dis.Instruction.make for 3.14 (#14039)

This commit is contained in:
Semyon Moroz
2025-05-13 15:15:11 +00:00
committed by GitHub
parent 209383988d
commit 6deddd7e20
2 changed files with 15 additions and 1 deletions
+15
View File
@@ -106,6 +106,21 @@ class Instruction(_Instruction):
def jump_target(self) -> int: ...
@property
def is_jump_target(self) -> bool: ...
if sys.version_info >= (3, 14):
@staticmethod
def make(
opname: str,
arg: int | None,
argval: Any,
argrepr: str,
offset: int,
start_offset: int,
starts_line: bool,
line_number: int | None,
label: int | None = None,
positions: Positions | None = None,
cache_info: list[tuple[str, int, Any]] | None = None,
) -> Instruction: ...
class Bytecode:
codeobj: types.CodeType