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

fix(help): Don't accidentally show long help with --help when it isn't intended. #4710

Merged
merged 1 commit into from Feb 15, 2023

Conversation

not-my-profile
Copy link
Contributor

@not-my-profile not-my-profile commented Feb 15, 2023

We were accidentally showing long help just because a hidden argument had a description for a possible value. This is most likely to be hit with the derive API as the value descriptions are automatically applied from documentation.

not-my-profile added a commit to not-my-profile/ruff that referenced this pull request Feb 15, 2023
For example:

    $ ruff check --select=EM<Tab>
    EM          -- flake8-errmsg
    EM10   EM1  --
    EM101       -- raw-string-in-exception
    EM102       -- f-string-in-exception
    EM103       -- dot-format-in-exception

(You will need to enable autocompletion as described
 in the Autocompletion section in the README.)

Fixes astral-sh#2808.

(The --help help change in the README is due to a clap bug,
 for which I already submitted a fix:
 clap-rs/clap#4710.)
charliermarsh pushed a commit to astral-sh/ruff that referenced this pull request Feb 15, 2023
For example:

    $ ruff check --select=EM<Tab>
    EM          -- flake8-errmsg
    EM10   EM1  --
    EM101       -- raw-string-in-exception
    EM102       -- f-string-in-exception
    EM103       -- dot-format-in-exception

(You will need to enable autocompletion as described
 in the Autocompletion section in the README.)

Fixes #2808.

(The --help help change in the README is due to a clap bug,
 for which I already submitted a fix:
 clap-rs/clap#4710.)
@epage epage changed the title Fix --help help text in edge case Don't accidentally show long help with --help when it isn't intended. Feb 15, 2023
@epage epage changed the title Don't accidentally show long help with --help when it isn't intended. fix(help): Don't accidentally show long help with --help when it isn't intended. Feb 15, 2023
@epage epage merged commit 473cf17 into clap-rs:master Feb 15, 2023
@epage
Copy link
Member

epage commented Feb 15, 2023

Thanks!

@epage
Copy link
Member

epage commented Feb 15, 2023

Released

@not-my-profile
Copy link
Contributor Author

Thanks for the quick release :) I am afraid I missed that there were actually two bugs ... opened #4712 for the second one.

not-my-profile added a commit to not-my-profile/ruff that referenced this pull request Feb 15, 2023
My two clap bug fixes[1][2] have been merged and released
(see the change in README.md).

[1]: clap-rs/clap#4710
[2]: clap-rs/clap#4712
charliermarsh pushed a commit to astral-sh/ruff that referenced this pull request Feb 15, 2023
My two clap bug fixes[1][2] have been merged and released
(see the change in README.md).

[1]: clap-rs/clap#4710
[2]: clap-rs/clap#4712
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants