mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Convert namedtuples to class syntax (#3321)
This commit is contained in:
@@ -21,19 +21,15 @@ _have_code_or_string = Union[_have_code, str, bytes]
|
||||
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
Instruction = NamedTuple(
|
||||
"Instruction",
|
||||
[
|
||||
('opname', str),
|
||||
('opcode', int),
|
||||
('arg', Optional[int]),
|
||||
('argval', Any),
|
||||
('argrepr', str),
|
||||
('offset', int),
|
||||
('starts_line', Optional[int]),
|
||||
('is_jump_target', bool)
|
||||
]
|
||||
)
|
||||
class Instruction(NamedTuple):
|
||||
opname: str
|
||||
opcode: int
|
||||
arg: Optional[int]
|
||||
argval: Any
|
||||
argrepr: str
|
||||
offset: int
|
||||
starts_line: Optional[int]
|
||||
is_jump_target: bool
|
||||
|
||||
class Bytecode:
|
||||
codeobj: types.CodeType
|
||||
|
||||
Reference in New Issue
Block a user