Skip to content

""" Leading summary whitespace (as in this issue title).""" #39

@olibre

Description

@olibre

For better readability, some people prefer inserting a space between the triple quotes """ and the summary text:

def is_ascii(text):
    """ Checks if contains only ASCII characters."""
    return all(ord(letter) < 128 for letter in text)

The leading whitespace:

       🡇
    """ Checks if contains only ASCII characters."""

Without that whitespace:

    """Checks if contains only ASCII characters."""

We may add an option --leading-summary-space or --pre-summary-space or --space-before-summary or --space-after-triple-quotes... What option name do you prefer?

Attention, this option has no effect on multi-lines docstring when --pre-summary-newline is used.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: styleRelates to docstring format style (e.g., Google, NumPy, Sphinx)P: enhancementFeature that is outside the scope of PEP 257

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions