Skip to content

Commit

Permalink
last of items
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorpela committed Jan 27, 2024
1 parent 5c9489f commit 51de606
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion overrides/overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ def _get_base_class_names(frame: FrameType) -> List[List[str]]:
add_last_step = True

for instruction in dis.get_instructions(frame.f_code):
print(f"{instruction.offset} : {instruction.opname} {instruction.argval}")
if instruction.offset > frame.f_lasti:
break
if instruction.opcode not in dis.hasname:
Expand All @@ -216,6 +215,8 @@ def _get_base_class_names(frame: FrameType) -> List[List[str]]:

# Combine LOAD_NAME and LOAD_GLOBAL as they have similar functionality
if instruction.opname in ["LOAD_NAME", "LOAD_GLOBAL"]:
if current_item:
items.append(current_item)
current_item = [instruction.argval]

elif instruction.opname == "LOAD_ATTR" and current_item:
Expand Down

0 comments on commit 51de606

Please sign in to comment.