diff options
author | rsiddharth <s@ricketyspace.net> | 2017-06-04 23:26:45 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2017-06-04 23:31:46 +0000 |
commit | dd3972a722514d9c49813fe1d05ee24dcf1ecb95 (patch) | |
tree | 897c900d5047f0f9bda79d4d0128969362b04637 | |
parent | f57643a70dfe7949e398c620a2a33e9167be5c70 (diff) |
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.
-rw-r--r-- | mdl_style.py | 9 |
1 files 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(): |