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

tables in --argument help strings would be nice #2

Open
mdengler opened this issue May 4, 2021 · 0 comments
Open

tables in --argument help strings would be nice #2

mdengler opened this issue May 4, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@mdengler
Copy link

mdengler commented May 4, 2021

It would be nice if tables in help came out well:

    parser.add_argument(
        "--arg",
        help="""
            This same feature would be useful for arguments that would
            benefit from
            more explanation.

              1. It looks nicer
              2. It is easier to read, even if some of the bullets get to be a little long.
              3. Also, there is a table:
                 | Feature      | ParagraphFormatter | FlexiFormatter |
                 | :---         | :---:              | :---:          |
                 | Outputs text |        Yes         |       Yes      |
                 | Bullets?     |        Yes         |       Yes      |
                 | Tables       |        No          |       Yes      |
              4. Bullets can follow tables.

        """,  # noqa
    )

...should render like:

************************
Using the Flexi formatter
*************************

usage: flexidemo.py [-h] [--arg ARG]

optional arguments:
  -h, --help  show this help message and exit
  --arg ARG   This same feature would be useful for arguments that would benefit from more explanation.
               
                1. It looks nicer
                2. It is easier to read, even if some of the bullets get to be a little long.
                3. Also, there is a table:
                        | Feature      | ParagraphFormatter | FlexiFormatter |
                        | :---         | :---:              | :---:          |
                        | Outputs text |        Yes         |       Yes      |
                        | Bullets?     |        Yes         |       Yes      |
                        | Tables       |        No          |       Yes      |
                4. Bullets can follow tables.

This is a multi-paragraph epilog. It is presenting data that would benefit by being visually broken up into pieces.

@davesteele davesteele added the enhancement New feature or request label May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants