Skip to content

Commit 2b43bfa

Browse files
committed
fix: handle LOAD_FAST_BORROW_LOAD_FAST_BORROW
1 parent 2f0571a commit 2b43bfa

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

executing/_position_node_finder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,9 @@ def node_match(node_type: Union[Type, Tuple[Type, ...]], **kwargs: Any) -> bool:
919919
if inst_match(("STORE_NAME","LOAD_NAME"), argval="__conditional_annotations__"):
920920
return
921921

922+
if inst_match("LOAD_FAST_BORROW_LOAD_FAST_BORROW") and node_match(ast.Name) and node.id in instruction.argval:
923+
return
924+
922925
# old verifier
923926

924927
typ: Type = type(None)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
def main():
2+
with something as done:
3+
for num in todo:
4+
done[num]

0 commit comments

Comments
 (0)