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.
This commit is contained in:
Brett Smith 2020-04-27 16:44:39 -04:00
parent d3415a8721
commit 1383dabf3b

View file

@ -49,7 +49,7 @@ class Directive(NamedTuple):
class Error(NamedTuple): class Error(NamedTuple):
source: Optional[bc_data.Meta] source: Optional[Mapping[MetaKey, MetaValue]]
message: str message: str
entry: Optional[Directive] entry: Optional[Directive]