mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
quick clean of arg parsing function by using default param
This commit is contained in:
parent
ef9cd5c2bf
commit
1d5c065b1f
1 changed files with 1 additions and 4 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Reference in a new issue