Skip to content

[rejected AI] remove indentation from epilog text - #3830

Closed
raghibhaque wants to merge 1 commit into
pallets:mainfrom
raghibhaque:fix/2881-epilog-indentation
Closed

raghibhaque wants to merge 1 commit into
pallets:mainfrom
raghibhaque:fix/2881-epilog-indentation

Conversation

@raghibhaque

Copy link
Copy Markdown

Description

Fixes #2881

When an epilog is added to a Click group or command, it was being indented along with the commands list. This change removes the indentation context so the epilog appears at the same level as other top-level help sections.

Changes

  • Removed with formatter.indentation(): context from format_epilog() method in src/click/core.py
  • Added two test cases to verify epilog is not indented
  • Updated CHANGES.md with the fix

Testing

All 39 existing tests pass, plus 2 new tests specifically for this fix.

The epilog will now be printed without indentation, allowing users to control its formatting via the epilog text itself (e.g., using the \b prefix if needed).

Fixes #2881. When an epilog is added to a Click group or command,
it was being indented along with the commands list. This change
removes the indentation context so the epilog appears at the same
level as other top-level help sections.

The epilog will now be printed without indentation, allowing users
to control its formatting via the epilog text itself (e.g., using
the \\b prefix if needed).
@davidism

davidism commented Sep 2, 2026

Copy link
Copy Markdown
Member

@davidism davidism closed this Sep 2, 2026
@davidism davidism added the rejected AI Contribution rejected because of its untrustworthy AI origin label Sep 2, 2026
@davidism davidism changed the title fix: remove indentation from epilog text [rejected AI] remove indentation from epilog text Sep 2, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

rejected AI Contribution rejected because of its untrustworthy AI origin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow epilog without indentation.

2 participants