Skip to content

Store raw help string for commands#2150

Closed
stephenfin wants to merge 1 commit into
pallets:mainfrom
stephenfin:raw-help
Closed

Store raw help string for commands#2150
stephenfin wants to merge 1 commit into
pallets:mainfrom
stephenfin:raw-help

Conversation

@stephenfin
Copy link
Copy Markdown
Contributor

@stephenfin stephenfin commented Dec 8, 2021

Some tools, such as sphinx-click, may wish to access the full help string for a command including any text after the form feed character (which indicates truncation). Make this possible by storing this help string before truncation.

An alternative to this approach would be store the untruncated string in help and simply truncate on load. That's technically a breaking change. Another one is to do nothing, and I can close the RFE against sphinx-click.

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code.
  • Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • Add .. versionchanged:: entries in any relevant code docs.
  • Run pre-commit hooks and fix any issues.
  • Run pytest and tox, no tests failed.

Some tools, such as sphinx-click [1], may wish to access the full help
string for a command including any text after the form feed character
(which indicates truncation [2]). Make this possible by storing this
help string before truncation.

[1] click-contrib/sphinx-click#56
[2] https://click.palletsprojects.com/en/latest/documentation/#truncating-help-texts

Signed-off-by: Stephen Finucane <stephen@that.guru>
@stephenfin
Copy link
Copy Markdown
Contributor Author

#2149 (comment)

@stephenfin stephenfin closed this Dec 8, 2021
@stephenfin stephenfin deleted the raw-help branch December 9, 2021 09:44
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Access untruncated help string

1 participant