Improve help message formatting and content#3070
Improve help message formatting and content#3070centosinfra-prod-github-app[bot] merged 5 commits intopackit:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new utility function break_lines_in_text to improve the formatting of help messages by wrapping long lines. It also refactors the HELP_COMMENT_EPILOG constant and integrates the new line-breaking logic into the help message generation. While the overall goal of improving help message readability is positive, there are a few areas where the implementation could be more robust and consistent, particularly regarding line breaking for all parts of the message and the use of HTML entities for spacing.
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 51s |
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 50s |
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 48s |
TomasTomecek
left a comment
There was a problem hiding this comment.
LGTM, definitely a great improvement.
In the future I'd love to see the output being 100% markdown but that would require custom argparse formatter which is definitely outside the scope of this PR.
The automatically generated help message (generated by `argparse`) contains lines, which are way too long to fit in a comment box. Reading the comment requires side scrolling, which is not idel. This commit manually breaks up lines, which exceed the maximum specified length where necessary. Descriptions of jobs have also been split across multiple lines where needed.
The automatically generated description of the `help` command starts with a lowercase character, so the other descriptions shouldn't be capitalized either.
d7d33da to
3aae238
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 52s |
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 58s |
|
✔️ pre-commit SUCCESS in 1m 48s |
5a94c8c to
97d9e6f
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 52s |
Fix improper content of the help message listing the `help` command as `--help`.
Previously, the link provided led to the general Packit docs.
97d9e6f to
509ddad
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 52s |
|
Build succeeded (gate pipeline). ✔️ pre-commit SUCCESS in 1m 48s |
This PR improves the formatting of the help message from this:
To this:
The epilog is removed from the code block and reformatted. Lines, which were previously too long, have been split across multiple lines. The job descriptions start now with lowercase characters and the
helpjob description has been changed. The--helppositinal argument has been removed and now the message correctly refers to thehelpcommand instead.