lib/devpipeline_core/toolsupport.py
def build_flex_args_keys(components):
    """
    Helper function to build a list of options.

    Some tools require require variations of the same options (e.g., cflags
    for debug vs release builds), but manually creating those options is
    cumbersome and error-prone.  This function handles that work by combining
    all possible comintations of the values in components.

    Arguments
    components -- A list of lists that should be combined to form options.
    """

    def _prepend_first(components, sub_components):
        ret = []
        for first in components[0]:
            for sub_component in sub_components:
                ret.append("{}.{}".format(first, sub_component))
        return ret

    if len(components) > 1:
        sub_components = build_flex_args_keys(components[1:])
        return _prepend_first(components, sub_components)
    if len(components) == 1:
        return components[0]
    return []

    Helper function to build a list of options.

    Some tools require require variations of the same options (e.g., cflags
    for debug vs release builds), but manually creating those options is
    cumbersome and error-prone.  This function handles that work by combining
    all possible comintations of the values in components.

    Arguments
    components -- A list of lists that should be combined to form options.
    
Helper function to build a list of options.
Some tools require require variations of the same options , but manually creating those options is
cumbersome and error-prone.  This function handles that work by combining
all possible comintations of the values in components.

Arguments
components -- A list of lists that should be combined to form options.
Helper function to build a list of options . Some tools require require variations of the same options but manually creating those options is cumbersome and error - prone . This function handles that work by combining all possible comintations of the values in components . Arguments components -- A list of lists that should be combined to form options .
def build_flex_args_keys(components):
    def _prepend_first(components, sub_components):
        ret = []
        for first in components[0]:
            for sub_component in sub_components:
                ret.append("{}.{}".format(first, sub_component))
        return ret
    if len(components) > 1:
        sub_components = build_flex_args_keys(components[1:])
        return _prepend_first(components, sub_components)
    if len(components) == 1:
        return components[0]
    return []
def build_flex_args_keys ( components ) : def _prepend_first ( components , sub_components ) : ret = [ ] for first in components [ 0 ] : for sub_component in sub_components : ret . append ( "{}.{}" . format ( first , sub_component ) ) return ret if len ( components ) > 1 : sub_components = build_flex_args_keys ( components [ 1 : ] ) return _prepend_first ( components , sub_components ) if len ( components ) == 1 : return components [ 0 ] return [ ]
Helper function to build a list of options.
Helper function to build a list of options .
"""
    Helper function to build a list of options.

    Some tools require require variations of the same options (e.g., cflags
    for debug vs release builds), but manually creating those options is
    cumbersome and error-prone.  This function handles that work by combining
    all possible comintations of the values in components.

    Arguments
    components -- A list of lists that should be combined to form options.
    """
components