

def create_list(list_type):
    '\n    Based on the passed in list_type create a list objects (ol/ul). In the\n    future this function will also deal with what the numbering of an ordered\n    list should look like.\n    '
    list_types = {
        'bullet': 'ul',
    }
    el = etree.Element(list_types.get(list_type, 'ol'))
    list_type_conversions = {
        'decimal': DEFAULT_LIST_NUMBERING_STYLE,
        'decimalZero': 'decimal-leading-zero',
        'upperRoman': 'upper-roman',
        'lowerRoman': 'lower-roman',
        'upperLetter': 'upper-alpha',
        'lowerLetter': 'lower-alpha',
        'ordinal': DEFAULT_LIST_NUMBERING_STYLE,
        'cardinalText': DEFAULT_LIST_NUMBERING_STYLE,
        'ordinalText': DEFAULT_LIST_NUMBERING_STYLE,
    }
    if (list_type != 'bullet'):
        el.set('data-list-type', list_type_conversions.get(list_type, DEFAULT_LIST_NUMBERING_STYLE))
    return el

dataset/ETHPy150Open PolicyStat/docx2html/docx2html/core.py create_list/original