-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Labels
C: styleRelates to docstring format style (e.g., Google, NumPy, Sphinx)Relates to docstring format style (e.g., Google, NumPy, Sphinx)P: enhancementFeature that is outside the scope of PEP 257Feature that is outside the scope of PEP 257
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C: styleRelates to docstring format style (e.g., Google, NumPy, Sphinx)Relates to docstring format style (e.g., Google, NumPy, Sphinx)P: enhancementFeature that is outside the scope of PEP 257Feature that is outside the scope of PEP 257