Use dictionary instead of list to track entry to file maps

This commit is contained in:
Debanjum Singh Solanky
2022-09-10 23:08:30 +03:00
parent 3e1323971b
commit a7cf6c8458
3 changed files with 9 additions and 9 deletions

View File

@@ -141,7 +141,7 @@ def convert_org_nodes_to_entries(entries: list[orgnode.Orgnode], entry_to_file_m
return entry_maps
def convert_org_entries_to_jsonl(entries) -> str:
def convert_org_entries_to_jsonl(entries: list[dict]) -> str:
"Convert each Org-Mode entry to JSON and collate as JSONL"
return ''.join([f'{json.dumps(entry_dict, ensure_ascii=False)}\n' for entry_dict in entries])