tools/metrics/actions/action_utils.py
def CreateActionsFromSuffixes(actions_dict, action_suffix_nodes):
  """Creates new actions from suffixes and adds them to actions_dict.

  Args:
    actions_dict: dict of existing action name to Action object.
    action_suffix_nodes: a list of action-suffix nodes

  Returns:
    A dictionary of action name to list of Suffix objects for that action.

  Raises:
    UndefinedActionItemError: if an affected action name can't be found
  """
  action_to_suffixes_dict = _CreateActionToSuffixesDict(action_suffix_nodes)

  # Some actions in action_to_suffixes_dict keys may yet to be created.
  # Therefore, while new actions can be created and added to the existing
  # actions keep calling _CreateActionsFromSuffixes.
  while _CreateActionsFromSuffixes(actions_dict, action_to_suffixes_dict):
    pass

  # If action_to_suffixes_dict is not empty by the end, we have missing actions.
  if action_to_suffixes_dict:
    raise UndefinedActionItemError('Following actions are missing: %s.' %
                                   (list(action_to_suffixes_dict.keys())))
Creates new actions from suffixes and adds them to actions_dict.

  Args:
    actions_dict: dict of existing action name to Action object.
    action_suffix_nodes: a list of action-suffix nodes

  Returns:
    A dictionary of action name to list of Suffix objects for that action.

  Raises:
    UndefinedActionItemError: if an affected action name can't be found
  
Creates new actions from suffixes and adds them to actions_dict.
Creates new actions from suffixes and adds them to actions_dict .
def CreateActionsFromSuffixes(actions_dict, action_suffix_nodes):
  action_to_suffixes_dict = _CreateActionToSuffixesDict(action_suffix_nodes)
  while _CreateActionsFromSuffixes(actions_dict, action_to_suffixes_dict):
    pass
  if action_to_suffixes_dict:
    raise UndefinedActionItemError('Following actions are missing: %s.' %
                                   (list(action_to_suffixes_dict.keys())))
def CreateActionsFromSuffixes ( actions_dict , action_suffix_nodes ) : action_to_suffixes_dict = _CreateActionToSuffixesDict ( action_suffix_nodes ) while _CreateActionsFromSuffixes ( actions_dict , action_to_suffixes_dict ) : pass if action_to_suffixes_dict : raise UndefinedActionItemError ( 'Following actions are missing: %s.' % ( list ( action_to_suffixes_dict . keys ( ) ) ) )
Creates new actions from suffixes and adds them to actions_dict.
Creates new actions from suffixes and adds them to actions_dict .
"""Creates new actions from suffixes and adds them to actions_dict.

  Args:
    actions_dict: dict of existing action name to Action object.
    action_suffix_nodes: a list of action-suffix nodes

  Returns:
    A dictionary of action name to list of Suffix objects for that action.

  Raises:
    UndefinedActionItemError: if an affected action name can't be found
  """ # Some actions in action_to_suffixes_dict keys may yet to be created. # Therefore, while new actions can be created and added to the existing # actions keep calling _CreateActionsFromSuffixes. # If action_to_suffixes_dict is not empty by the end, we have missing actions.
A dictionary of action name to list of Suffix objects for that action.
A dictionary of action name to list of Suffix objects for that action .
if an affected action name can't be found
if an affected action name can ' t be found
UndefinedActionItemError
actions_dict
dict of existing action name to Action object.
dict of existing action name to Action object .
action_suffix_nodes
a list of action-suffix nodes
a list of action - suffix nodes