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

Issue with Click 6.7 #51

Open
mahyarmirrashed opened this issue Aug 20, 2024 · 0 comments
Open

Issue with Click 6.7 #51

mahyarmirrashed opened this issue Aug 20, 2024 · 0 comments

Comments

@mahyarmirrashed
Copy link

Click 6.7 doesn't support get_short_help_str so I had to monkey patch it like this. I hope this helps others.

import click


def _patched_get_short_help_str(command, limit=45):
    return (
        command.short_help
        or command.help
        and click.utils.make_default_short_help(command.help, limit)
        or ""
    )


def apply():
    click.Command.get_short_help_str = _patched_get_short_help_str  # type: ignore
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

No branches or pull requests

1 participant