Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide private args; convert "_"->"-" in *args name. #106

Closed
wants to merge 1 commit into from

Conversation

anntzer
Copy link

@anntzer anntzer commented Jun 26, 2016

Fixes both paths of #79.

@anntzer anntzer force-pushed the underscore-in-arg-name branch 3 times, most recently from 12a5033 to 7ddac0a Compare June 26, 2016 06:57
@anntzer anntzer force-pushed the underscore-in-arg-name branch from 7ddac0a to 96b2e83 Compare June 26, 2016 07:01
@coveralls
Copy link

coveralls commented Jun 26, 2016

Coverage Status

Coverage increased (+0.05%) to 93.642% when pulling 96b2e83 on anntzer:underscore-in-arg-name into 8ab4a5d on neithere:master.

@@ -181,7 +181,7 @@ def func(*file_paths):
argh.set_default_command(parser, func)

assert parser.add_argument.mock_calls == [
mock.call('file_paths', nargs='*',
mock.call('file_paths', nargs='*', metavar='file-paths',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens in the case without the metavar arg?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's always called with a metavar now, see line 120 of the patch to assembling.py.

@anntzer
Copy link
Author

anntzer commented Aug 28, 2023

Closing for lack of activity and because I don't use argh anymore; feel free to pick up the patch if desired.

@anntzer anntzer closed this Aug 28, 2023
@anntzer anntzer deleted the underscore-in-arg-name branch August 28, 2023 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants