pallets / pallets/click

Allow epilog without indentation.

Open
#2,881 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help output
Dominant language
Python
Stars
17.7k
Forks
2.3k
Avg merge
1d 30m
Merged PRs (30d)
18

Description

When adding an epilog to a group, the text appears to be indented under the commands list.

@click.group(
    context_settings={"max_content_width": 100, "show_default": True},
    epilog="""\b
    Example Usage:
        # Run this stuff first
        $ some-command
        
        # Then run this command
        my-click-script go
    """,
)
def regression() -> None:
    """This is a tool with lots of commands."""
    pass
$ regression --help

Usage: regression [OPTIONS] COMMAND [ARGS]...

  This is a tool with lots of commands.

Options:
  --help  Show this message and exit.

Commands:
  bundle  Wrap it all up.
  guard   Run lots of verifications.
  report  Generate a report from a bundle.
  run     Do stuff.
  store   Don't use this; it's for CI/CD only.
  verify  Compare two reports and verify they are identical.

  Example Usage:
      # Run this stuff first
      $ some-command
      
      # Then run this command
      regression guard

I want the entire epilog to not be indented. Perhaps indent-epilog=False?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided Click group and comparing the current regression --help output with the requested epilog formatting. Trace the help-generation path responsible for indenting group epilogs. Done means the entire epilog can remain unindented while the existing help output and command formatting continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.