tools/disable_tests/conditions.py
def parse(condition_strs: List[str]) -> Condition:
  """Parse a list of condition strings, as passed on the command line.

  Each element of condition_strs is a set of Terminal names joined with '&'s.
  The list is implicitly 'or'ed together.
  """

  # When no conditions are given, this is taken to mean "always".
  if not condition_strs:
    return ALWAYS

  try:
    return op_of('or', [
        op_of('and', [get_term(x.strip()) for x in cond.split('&')])
        for cond in condition_strs
    ])
  except ValueError as e:
    # Catching the exception raised by get_term.
    valid_conds = '\n'.join(sorted(f'\t{term.name}' for term in TERMINALS))
    raise errors.UserError(f"{e}\nValid conditions are:\n{valid_conds}")
Parse a list of condition strings, as passed on the command line.

  Each element of condition_strs is a set of Terminal names joined with '&'s.
  The list is implicitly 'or'ed together.
  
Parse a list of condition strings, as passed on the command line.
Each element of condition_strs is a set of Terminal names joined with '&'s.
The list is implicitly 'or'ed together.
Parse a list of condition strings as passed on the command line . Each element of condition_strs is a set of Terminal names joined with ' & ' s . The list is implicitly ' or ' ed together .
def parse(condition_strs: List[str]) -> Condition:
  if not condition_strs:
    return ALWAYS
  try:
    return op_of('or', [
        op_of('and', [get_term(x.strip()) for x in cond.split('&')])
        for cond in condition_strs
    ])
  except ValueError as e:
    valid_conds = '\n'.join(sorted(f'\t{term.name}' for term in TERMINALS))
    raise errors.UserError(f"{e}\nValid conditions are:\n{valid_conds}")
def parse ( condition_strs : List [ str ] ) -> Condition : if not condition_strs : return ALWAYS try : return op_of ( 'or' , [ op_of ( 'and' , [ get_term ( x . strip ( ) ) for x in cond . split ( '&' ) ] ) for cond in condition_strs ] ) except ValueError as e : valid_conds = '\n' . join ( sorted ( f'\t{term.name}' for term in TERMINALS ) ) raise errors . UserError ( f"{e}\nValid conditions are:\n{valid_conds}" )
Parse a list of condition strings, as passed on the command line.
Parse a list of condition strings as passed on the command line .
"""Parse a list of condition strings, as passed on the command line.

  Each element of condition_strs is a set of Terminal names joined with '&'s.
  The list is implicitly 'or'ed together.
  """ # When no conditions are given, this is taken to mean "always". # Catching the exception raised by get_term.
condition_strs
List[str]