-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Black should have an opinion about empty line after functions doc string #355
Comments
My gut feeling is the second approach (i.e. no blank line) is the most common style (even Black itself is using it). All examples in PEP 257 use it as well, this is also mentioned under "One-line Docstrings":
|
Just to add, this SO answer referencing PEP 257 convinced me that there should be no space after docstring, except for class docstrings:
So black should care about spaces after a docstring... |
to add to this, the problem is that class MyCustomError(Exception):
"""My custom error."""
pass while it is arguably better to format it as class MyCustomError(Exception):
"""My custom error."""
pass |
To track this issue against |
We will be tracking this in #450. |
Currently Black forces an empty line after a class docstring, but it does not do it for functions.
This code will be left unchanged by Black:
Black should have an opinion about that. I don't really care about the choice.
The text was updated successfully, but these errors were encountered: