MCPcopy
hub / github.com/rocky/python-uncompyle6 / restrict_to_parent

Method restrict_to_parent

uncompyle6/scanner.py:597–601  ·  view source on GitHub ↗

Restrict target to parent structure boundaries.

(self, target: int, parent)

Source from the content-addressed store, hash-verified

595 return self.setTokenClass(Token)
596
597 def restrict_to_parent(self, target: int, parent) -> int:
598 """Restrict target to parent structure boundaries."""
599 if not (parent["start"] < target < parent["end"]):
600 target = parent["end"]
601 return target
602
603 def setTokenClass(self, tokenClass: Token) -> Token:
604 self.Token = tokenClass

Callers 4

detect_control_flowMethod · 0.80
detect_control_flowMethod · 0.80
detect_control_flowMethod · 0.80
detect_control_flowMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected