From 1383dabf3ba8ef08ea5e3d1c71ca871244bca878 2020-04-27 20:44:39 From: Brett Smith Date: 2020-04-27 20:44:39 Subject: [PATCH] beancount_types: Make Error.source a Mapping rather than a Dict. The Beancount code just needs a mapping, and this lets us use Metadata or PostingMeta objects for Error sources. --- diff --git a/conservancy_beancount/beancount_types.py b/conservancy_beancount/beancount_types.py index 98db52fe7213ae6109938b73bb90c51471877c48..c82abf59a536b1601ad80ba91537cc3e268c9425 100644 --- a/conservancy_beancount/beancount_types.py +++ b/conservancy_beancount/beancount_types.py @@ -49,7 +49,7 @@ class Directive(NamedTuple): class Error(NamedTuple): - source: Optional[bc_data.Meta] + source: Optional[Mapping[MetaKey, MetaValue]] message: str entry: Optional[Directive]