예제 #1
0
파일: source.py 프로젝트: timgates42/poetry
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