예제 #1
0
def __convert_to_option(jtype, namespace, key, value, name=None, description=None):
    """Convert to Option dict

    This really should have been a concrete type, at least a namedtuple
    """
    opt_id = ".".join([namespace, 'task_options', key])
    name = "Option {n}".format(n=key) if name is None else name
    desc = "Option {n} description".format(n=key) if description is None else description
    opt = to_option_schema(opt_id, jtype, name, desc, value)
    return opt
예제 #2
0
def __convert_to_option(jtype, namespace, key, value, name=None, description=None):
    """Convert to Option dict

    This really should have been a concrete type, at least a namedtuple
    """
    opt_id = ".".join([namespace, 'task_options', key])
    name = "Option {n}".format(n=key) if name is None else name
    desc = "Option {n} description".format(n=key) if description is None else description
    opt = to_option_schema(opt_id, jtype, name, desc, value)
    return opt
예제 #3
0
def __convert_to_option(jtype, namespace, key, value):
    opt_id = ".".join([namespace, 'task_options', key])
    name = "Option {n}".format(n=key)
    desc = "Option {n} description".format(n=key)
    opt = to_option_schema(opt_id, jtype, name, desc, value)
    return opt
예제 #4
0
def __convert_to_option(jtype, namespace, key, value):
    opt_id = ".".join([namespace, 'task_options', key])
    name = "Option {n}".format(n=key)
    desc = "Option {n} description".format(n=key)
    opt = to_option_schema(opt_id, jtype, name, desc, value)
    return opt