MCPcopy Index your code
hub / github.com/python/mypy / allow_jump

Method allow_jump

mypy/binder.py:557–567  ·  view source on GitHub ↗
(self, index: int)

Source from the content-addressed store, hash-verified

555 self._cleanse_key(dep)
556
557 def allow_jump(self, index: int) -> None:
558 # self.frames and self.options_on_return have different lengths
559 # so make sure the index is positive
560 if index < 0:
561 index += len(self.options_on_return)
562 frame = Frame(self._get_id())
563 for f in self.frames[index + 1 :]:
564 frame.types.update(f.types)
565 if f.unreachable:
566 frame.unreachable = True
567 self.options_on_return[index].append(frame)
568
569 def handle_break(self) -> None:
570 self.allow_jump(self.break_frames[-1])

Callers 5

pop_frameMethod · 0.95
assign_typeMethod · 0.95
handle_breakMethod · 0.95
handle_continueMethod · 0.95
__enter__Method · 0.80

Calls 5

_get_idMethod · 0.95
lenFunction · 0.85
FrameClass · 0.85
appendMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected