Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(cli): fix action display in --help when there are few actions#2679

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 1 commit intopython-gitlab:mainfromjouve:help
Oct 10, 2023

Conversation

@jouve
Copy link
Contributor

@jouvejouve commentedOct 8, 2023
edited
Loading

Changes

display --help actions correctly when there are few actions.

fix#2656

Documentation and testing

Please consider whether this PR needs documentation and tests.This is not required, but highly appreciated:

Copy link
Member

@nejchnejch left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the fix@jouve, nice find.

I took the liberty of refactoring this a bit to be more readable (subjective of course!) and to fix a bug where the help indent was the length of all choices combined instead of the longest choice (which I think is the behavior you wanted. You're still set as the commit author of course. Hope that's alright with you! Thanks again!

@nejchnejchenabled auto-merge (rebase)October 10, 2023 12:12
@nejchnejch merged commitb22d662 intopython-gitlab:mainOct 10, 2023
@jouve
Copy link
ContributorAuthor

no problem, I'd rather you do that than back and forth commits/ comments in the PR :)

the length I used was to try to keep "Action to execute ..." fromaction: aligned with "show this help message ..." fromoptions: which seemed to be the default HelpFormatter behavior

options:  -h, --help  show this help message and exit              ^action:       ^  {list}      Action to execute on the GitLab resource.              ^              ^ aligned

but I think your idea will look better.

@glensc
Copy link

@nejch the find is mine:

nejch reacted with heart emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nejchnejchnejch approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Bogus } in usage

3 participants

@jouve@glensc@nejch

[8]ページ先頭

©2009-2025 Movatter.jp