From dd3972a722514d9c49813fe1d05ee24dcf1ecb95 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sun, 4 Jun 2017 23:26:45 +0000 Subject: mdl_style.py: Update _get_args. - Add `args` as an optional argument t `_get_args`. - Update the help text for argument `link_style` and `file`. * mdl_style.py (_get_args): Update function. --- mdl_style.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mdl_style.py b/mdl_style.py index 99b63c0..46e819d 100644 --- a/mdl_style.py +++ b/mdl_style.py @@ -252,15 +252,16 @@ def _mdl_stylize(args): print(ls(args.file), end='') -def _get_args(): + +def _get_args(args=None): parser = argparse.ArgumentParser() parser.add_argument('--version', action='version', version=__version__) parser.add_argument('link_style', choices=['inline', 'footnote'], - help='Markdown Link style.') + help='markdown link style.') parser.add_argument('file', type=argparse.FileType('r'), - help='Path to Markdown file.') - return parser.parse_args() + help='path to markdown file.') + return parser.parse_args(args) def main(): -- cgit v1.2.3