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

Fix whitespace formatting in CLI help. #917

Merged
merged 1 commit into from
Feb 4, 2025
Merged

Conversation

Carreau
Copy link
Member

@Carreau Carreau commented Feb 4, 2025

For traitlets that have long descriptions, and in particular that uses multiline strings, this lead to inconsistant indentation – and mmissing newlines in rewrapped paragraphs.

  • Each paragraph in wrap_paragraphs would be a list item, and thus need to be joined by 2 newlines (or we need to ensure that each list item in wrap_paragraph would end in a NL, but that woudl change API

  • When help is ina multiline string, if the line start on the first line:

    """like in

    this kind of help"""

    but not like

    """
    in this kind

    of documentation help
    """

    Wrap parragraph would not properly dedent.

For traitlets that have long descriptions, and in particular that uses
multiline strings, this lead to inconsistant indentation – and mmissing
newlines in rewrapped paragraphs.

 - Each paragraph in wrap_paragraphs would be a list item, and thus need
   to be joined by 2 newlines (or we need to ensure that each list item
   in wrap_paragraph would end in a NL, but that woudl change API
 - When help is ina multiline string, if the line start on the first
   line:

    """like in

    this kind of help"""

    but not like

    """
    in this kind

    of documentation help
    """

    Wrap parragraph would not properly dedent.
@minrk minrk merged commit e29ce7c into ipython:main Feb 4, 2025
30 of 31 checks passed
@minrk
Copy link
Member

minrk commented Feb 4, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants