示例#1
0
def source_to_table(source: Source) -> Table:
    from tomlkit import nl
    from tomlkit import table

    source_table: Table = table()
    for key, value in source.to_dict().items():
        source_table.add(key, value)
    source_table.add(nl())
    return source_table
示例#2
0
 def source_to_table(source: Source) -> Table:
     source_table: Table = table()
     for key, value in source.to_dict().items():
         source_table.add(key, value)
     source_table.add(nl())
     return source_table