예제 #1
0
def my_convert_hybrid(manager, val, arg_type):
    """Modified convert_hybrid using a sequence of strings for section_refs."""
    if arg_type.startswith('refs:'):
        subtype = 'ref:' + arg_type.split(':', 1)[1]
        return [
            basics.LazyNamedSectionRef(manager, subtype, name) for name in val
        ]
    return basics.convert_hybrid(manager, val, arg_type)
예제 #2
0
def my_convert_hybrid(manager, val, arg_type):
    """Modified convert_hybrid using a sequence of strings for section_refs."""
    if arg_type.startswith('refs:'):
        subtype = 'ref:' + arg_type.split(':', 1)[1]
        return list(
            basics.LazyNamedSectionRef(manager, subtype, name)
            for name in val)
    return basics.convert_hybrid(manager, val, arg_type)