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

argparse: Make formatting of argument descriptions less ambiguous #7490

Conversation

jhogberg
Copy link
Contributor

Currently, the default value is rather ambiguous for choice types, being presented as:

choice: a, b, c, d, a

Where it's not entirely clear that the last value, a, is the default. This PR attempts to fix that.

@jhogberg jhogberg added team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI labels Jul 11, 2023
@jhogberg jhogberg self-assigned this Jul 11, 2023
@jhogberg jhogberg added this to the OTP-26.1 milestone Jul 11, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 11, 2023

CT Test Results

       2 files       89 suites   39m 25s ⏱️
1 914 tests 1 866 ✔️ 48 💤 0
2 208 runs  2 158 ✔️ 50 💤 0

Results for commit cda7aef.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@jhogberg jhogberg force-pushed the john/stdlib/tweak-argparse-description-formatting/ERIERL-965/OTP-18679 branch from 6cf78b4 to cda7aef Compare July 11, 2023 09:58
Copy link
Contributor

@max-au max-au left a comment

Choose a reason for hiding this comment

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

Thanks!

Fun fact, originally argparse was not able to limit help format width, and I tried to make arguments printing as compact as I could. Sometimes too compact :-)

@jhogberg jhogberg merged commit e4dcfa2 into erlang:maint Jul 26, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants