tools/disable_tests/conditions.py
def find_terminals(cond: Condition) -> Set[Terminal]:
  """Find all leaf Terminal nodes of this Condition."""

  if isinstance(cond, BaseCondition):
    return set()

  if isinstance(cond, Terminal):
    return {cond}

  assert isinstance(cond, tuple)
  op, args = cond
  if op == 'not':
    return find_terminals(args)
  return {var for arg in args for var in find_terminals(arg)}
Find all leaf Terminal nodes of this Condition.
Find all leaf Terminal nodes of this Condition.
Find all leaf Terminal nodes of this Condition .
def find_terminals(cond: Condition) -> Set[Terminal]:
  if isinstance(cond, BaseCondition):
    return set()
  if isinstance(cond, Terminal):
    return {cond}
  assert isinstance(cond, tuple)
  op, args = cond
  if op == 'not':
    return find_terminals(args)
  return {var for arg in args for var in find_terminals(arg)}
def find_terminals ( cond : Condition ) -> Set [ Terminal ] : if isinstance ( cond , BaseCondition ) : return set ( ) if isinstance ( cond , Terminal ) : return { cond } assert isinstance ( cond , tuple ) op , args = cond if op == 'not' : return find_terminals ( args ) return { var for arg in args for var in find_terminals ( arg ) }
Find all leaf Terminal nodes of this Condition.
Find all leaf Terminal nodes of this Condition .
"""Find all leaf Terminal nodes of this Condition."""
cond
Condition