From ce07fedc06b05cc7514abf8eeffa8b91a0a909d5 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Thu, 2 Jul 2020 21:46:03 -0700 Subject: [PATCH] quick clean of arg parsing function by using default param --- jrnl/parsing.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jrnl/parsing.py b/jrnl/parsing.py index 6276fd6b..5299f75e 100644 --- a/jrnl/parsing.py +++ b/jrnl/parsing.py @@ -18,7 +18,7 @@ class WrappingFormatter(argparse.RawDescriptionHelpFormatter): return textwrap.wrap(text, width=56) -def parse_args_before_config(args=None): +def parse_args_before_config(args=[]): """ Argument parsing that is doable before the config is available. Everything else goes into "text" for later parsing. @@ -264,9 +264,6 @@ def parse_args_before_config(args=None): const=None, ) - if not args: - args = [] - # Handle '-123' as a shortcut for '-n 123' num = re.compile(r"^-(\d+)$") args = [num.sub(r"-n \1", arg) for arg in args]