-
Notifications
You must be signed in to change notification settings - Fork 81
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
""" Leading summary whitespace (as in this issue title).""" #39
Comments
|
@ndevenish Made a pull request adding this option. Mind trying it out? |
😮 I have seen extra spaces around a one-line docstring, or extra leading space on the first line of a multiline docstring, but didn’t know there was a style of one-line docstring with leading space but no trailing space. |
Note that See psf/black#2912 |
Also worth pointing out https://docs.python.org/3/library/inspect.html#inspect.cleandoc strips this, so it should have no semantic difference (help docs do not have the whitespace). |
Last comment, E.g. # Adds leading space
""" "I'm quoted"."""
# But also doesn't
"""I'm not quoted.""" So applying the space everywhere would still land you in limbo. |
@thejcannon thanks for pointing this out. PR #46 is submitted to add the leading space. Once that PR is merged, using the |
Closed by #46 |
For better readability, some people prefer inserting a space between the triple quotes
"""
and the summary text:The leading whitespace:
Without that whitespace:
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
The text was updated successfully, but these errors were encountered: