class documentation

class _BranchTracker: (source)

View In Hierarchy

Track exhaustiveness in pattern matches.

Method __init__ Undocumented
Method add_branch Add a match case branch to the tracker.
Method add_default_branch Add a default match case branch to the tracker.
Method check_ending Check if we have ended a match statement with leftover cases.
Instance Variable matches Undocumented
Method _add_new_match Undocumented
Instance Variable _active_ends Undocumented
Instance Variable _tracker Undocumented
def __init__(self, director): (source)

Undocumented

def add_branch(self, op: opcodes.Opcode, match_var: cfg.Variable, case_var: cfg.Variable) -> Optional[bool]: (source)

Add a match case branch to the tracker.

def add_default_branch(self, op: opcodes.Opcode): (source)

Add a default match case branch to the tracker.

def check_ending(self, line: int, implicit_return: bool = False) -> List[Tuple[int, Set[int]]]: (source)

Check if we have ended a match statement with leftover cases.

Undocumented

def _add_new_match(self, match_val: abstract.Instance, match_line: int): (source)

Undocumented

_active_ends = (source)

Undocumented

_tracker: dict = (source)

Undocumented