[Feature] Add Custom Formatter System
Open
@davidism is already working on this.
Since Apr 12, 2021.
help output
- Dominant language
- Python
- Stars
- 17.7k
- Forks
- 2.3k
- Avg merge
- 1d 30m
- Merged PRs (30d)
- 18
Description
Right now there is just one way to format everything and it does not make everybody happy. Also it makes it hard for us to change it without potentially breaking things. So I propose the following:
- add a context setting to override a formatter class
- that formatter has attributes and methods to customize how things are emitted
- we have two classes for this: a default formatter that we keep improving and a legacy formatter that is as it looked like in click 5 which is super stable if you need a stable target
Things this would be used for:
- usage rendering
- wrapping of text
- colorization flags
- maximum width / minimum width of help output
- indentation style of help
- default value rendering etc.
- error messages
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.