You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the change in this PR is exposing a bug in the D413. 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.""""
Missing blank line after last section ("Note") Ruff(D413)
I can't see what's different between what I have and the Use instead: section of the documentation.
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.""""
The text was updated successfully, but these errors were encountered:
## Summary
Given:
```python
"""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."
"""
```
It turns out we excluded the line ending in `"""`, because it's empty
(unlike for functions, where it consists of the indent). This PR changes
the `following_lines` iterator to always include the trailing newline,
which gives us correct and consistent handling between function and
module-level docstrings.
Closes#9877.
nkxxll
pushed a commit
to nkxxll/ruff
that referenced
this issue
Mar 10, 2024
…#9878)
## Summary
Given:
```python
"""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."
"""
```
It turns out we excluded the line ending in `"""`, because it's empty
(unlike for functions, where it consists of the indent). This PR changes
the `following_lines` iterator to always include the trailing newline,
which gives us correct and consistent handling between function and
module-level docstrings.
Closesastral-sh#9877.
It seems that the change in this PR is exposing a bug in the
D413
. Ruff is calling this docstring bad:I can't see what's different between what I have and the
Use instead:
section of the documentation.I can make Ruff happy by adding excessive blank lines:
The text was updated successfully, but these errors were encountered: