Skip to content

Commit

Permalink
option to show args after parse args
Browse files Browse the repository at this point in the history
  • Loading branch information
j-luo93 committed Nov 4, 2019
1 parent f187299 commit 3446ae5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arglib/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ def reset_repo():
_Repository.reset()


def parse_args(known_only=False):
def parse_args(known_only=False, show=False):
"""If `show is set to True, call `show_args` after parsing."""
repo = _Repository()
return repo.parse_args(known_only=known_only)
ret = repo.parse_args(known_only=known_only)
if show:
show_args()
return ret


def add_registry(registry, stacklevel=1):
Expand Down

0 comments on commit 3446ae5

Please sign in to comment.