Add tags to mapping

This commit is contained in:
2025-03-02 20:24:47 -05:00
parent 35e1c1039e
commit 3e4a284692
5 changed files with 44 additions and 39 deletions

View File

@@ -81,9 +81,9 @@ def write_mappings(transactions: List[Transaction], mappings_file: Path):
)
mappings[t.row] = mapping
mappings = {k: v.dict() for k, v in mappings.items()}
mappings = {k: v.model_dump(exclude_none=True) for k, v in mappings.items()}
with open(mappings_file, "w") as f:
json.dump(mappings, f, indent=4)
json.dump(mappings, f, indent=2)
def read_mappings(mappings_file: Path) -> Dict[str, Mapping]: