From 1ef9f1aa5d407f9a2e64530bec522cb6acfa5eb5 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Thu, 2 Jul 2020 20:39:16 -0700 Subject: [PATCH] small code cleanup --- jrnl/cli.py | 5 ----- jrnl/util.py | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/jrnl/cli.py b/jrnl/cli.py index 57686029..54d81ab4 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -140,11 +140,6 @@ Python 3.7 (or higher) soon. manual_args = sys.argv[1:] args = parse_args_before_config(manual_args) - - # import pprint - # pp = pprint.PrettyPrinter(depth=4) - # pp.pprint(args) - configure_logger(args.debug) # Run command if possible before config is available diff --git a/jrnl/util.py b/jrnl/util.py index 3e03d99f..109d5af6 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -141,14 +141,14 @@ def scope_config(config, journal_name): return config config = config.copy() journal_conf = config["journals"].get(journal_name) - if ( - type(journal_conf) is dict - ): # We can override the default config on a by-journal basis + if type(journal_conf) is dict: + # We can override the default config on a by-journal basis log.debug( "Updating configuration with specific journal overrides %s", journal_conf ) config.update(journal_conf) - else: # But also just give them a string to point to the journal file + else: + # But also just give them a string to point to the journal file config["journal"] = journal_conf config.pop("journals") return config