(app_name, raise_err=True)
Return contents of "autofill_values" for given app_name.

    `raise_err` - If False, return {} if autofill_values does not exist
Return contents of "autofill_values" for given app_name.
Return contents of autofill_values for given app_name .
def get_autofill_values(app_name, raise_err=True):
    """Return contents of "autofill_values" for given app_name.

    `raise_err` - If False, return {} if autofill_values does not exist
    """
    app_data = cb.get_tasks_config()[app_name]
    try:
        vals = app_data['autofill_values']
    except KeyError:
        msg = (
            'Expected to find `autofill_values` defined in task'
            ' configuration for given app_name.  This is required when the'
            ' task introduces a new job_id component in its job_id_template'
            ' that does not exist on a parent node, and also when the app'
            ' depends_on "all" autofill_values from a parent.'
        )
        if raise_err:
            log.exception(msg, extra=dict(app_name=app_name))
            raise DAGMisconfigured("%s  app_name: %s" % (msg, app_name))
        return {}
    assert isinstance(vals, cb.TasksConfigBaseMapping), "expected a mapping"
    try:
        return {
            k: not isinstance(v, (list, cb.TasksConfigBaseSequence)) and
            range(*(int(x) for x in v.split(':', 2))) or list(v) or []
            for k, v in vals.items()}
    except:
        log.error(
            "Failed to parse config data for app_name.autofill_values",
            extra=dict(app_name=app_name))
        raise
def get_autofill_values ( app_name , raise_err = True ) : app_data = cb . get_tasks_config ( ) [ app_name ] try : vals = app_data [ 'autofill_values' ] except KeyError : msg = ( 'Expected to find `autofill_values` defined in task' ' configuration for given app_name.  This is required when the' ' task introduces a new job_id component in its job_id_template' ' that does not exist on a parent node, and also when the app' ' depends_on "all" autofill_values from a parent.' ) if raise_err : log . exception ( msg , extra = dict ( app_name = app_name ) ) raise DAGMisconfigured ( "%s  app_name: %s" % ( msg , app_name ) ) return { } assert isinstance ( vals , cb . TasksConfigBaseMapping ) , "expected a mapping" try : return { k : not isinstance ( v , ( list , cb . TasksConfigBaseSequence ) ) and range ( * ( int ( x ) for x in v . split ( ':' , 2 ) ) ) or list ( v ) or [ ] for k , v in vals . items ( ) } except : log . error ( "Failed to parse config data for app_name.autofill_values" , extra = dict ( app_name = app_name ) ) raise