-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Request: Remove sequential blank lines in docstrings #9451
Comments
This looks useful. |
@stinodego would you expect this to happen as part of a lint rule or are you asking for docstring formatting? |
I honestly don't really know what the difference is between the two. Either is fine with me! |
This looks related to a change in this PR. Ruff is calling this docstring bad: """Make a summary line.
Note:
----
Per the code comment the next two lines are blank. "// The first blank line is the line containing the closing
triple quotes, so we need at least two."
"""
I can't see what's different between what I have and the I can make Ruff happy by adding excessive blank lines: """Make a summary line.
Note:
----
Per the code comment the next two lines are blank. "// The first blank line is the line containing the closing
triple quotes, so we need at least two."
""" |
Seems like a bug in D413 (which was incorrectly implemented before that PR, and never really triggered), but I don't think it's related to this issue per se? |
Only in as much as this issue is to remove excessive whitespace like that bug is enforcing. I'll create a new issue for that. Thanks. |
I'd like a way to get rid of extraneous whitespace in docstrings.
Here's an example of a docstring with way too much whitespace:
I'd like ruff to format this down to:
On a related note, there is currently no way to make sure there is no blank line after the last section (the opposite of
D413
). This would be a useful lint to have!The text was updated successfully, but these errors were encountered: