From 97d813972b70bdd829272ca0f036972f1b1eac09 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Thu, 16 Jul 2020 15:37:11 -0400 Subject: [PATCH] books: Loader.load_none() returns default options_map. This way it's still safe to assume all the expected keys are there. --- conservancy_beancount/books.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conservancy_beancount/books.py b/conservancy_beancount/books.py index c2d04df..1fcd37c 100644 --- a/conservancy_beancount/books.py +++ b/conservancy_beancount/books.py @@ -18,7 +18,8 @@ import datetime from pathlib import Path -from beancount import loader as bc_loader +import beancount.loader as bc_loader +import beancount.parser.options as bc_options from typing import ( Any, @@ -204,4 +205,4 @@ class Loader: 'lineno': lineno, } errors: Errors = [Error(source, "no books to load in configuration", None)] - return [], errors, {} + return [], errors, bc_options.OPTIONS_DEFAULTS.copy()