Skip to content

Commit afaead5

Browse files
author
rocky
committed
version -> version_tuple fixes
1 parent be710d9 commit afaead5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

xasm/assemble.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,12 @@ def asm_file(path):
155155
line[len("# Python bytecode " + pypy_str) :].strip().split()[0]
156156
)
157157

158-
python_version_pair = version_str_to_tuple(version, len=2)
158+
python_version_pair = version_str_to_tuple(version, length=2)
159159
asm = Assembler(python_version_pair, is_pypy)
160160
if python_version_pair >= (3, 10):
161161
TypeError(
162-
f"Creating Python version {python_version} not supported yet. Feel free to fix and put in a PR.\n"
162+
f"Creating Python version {python_version} not supported yet. "
163+
"Feel free to fix and put in a PR.\n"
163164
)
164165
asm.code_init(python_version_pair)
165166
bytecode_seen = True
@@ -176,7 +177,7 @@ def asm_file(path):
176177
backpatch_inst = set([])
177178
methods[method_name] = co
178179
offset = 0
179-
python_version_pair = version_str_to_tuple(version, len=2)
180+
python_version_pair = version_str_to_tuple(version, length=2)
180181
asm.code_init(python_version_pair)
181182
asm.code.co_name = line[len("# Method Name: ") :].strip()
182183
method_name = asm.code.co_name
@@ -465,7 +466,7 @@ def create_code(asm, label, backpatch):
465466
elif is_int(inst.arg):
466467
if inst.opcode == asm.opc.EXTENDED_ARG:
467468
extended_value += inst.arg
468-
if asm.opc.version >= 3.6:
469+
if asm.opc.version_tuple >= (3, 6):
469470
extended_value <<= 8
470471
else:
471472
extended_value <<= 16

0 commit comments

Comments
 (0)