ruff/crates/ruff_linter/src/rules/pydocstyle
Charlie Marsh 45937426c7
Fix blank-line docstring rules for module-level docstrings (#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.

Closes https://github.com/astral-sh/ruff/issues/9877.
2024-02-07 16:48:28 -05:00
..
rules Fix blank-line docstring rules for module-level docstrings (#9878) 2024-02-07 16:48:28 -05:00
snapshots Fix blank-line docstring rules for module-level docstrings (#9878) 2024-02-07 16:48:28 -05:00
helpers.rs Ignore underlines when determining docstring logical lines (#8929) 2023-11-30 14:27:04 -05:00
mod.rs Remove preview gating for newly-added stable fixes (#9681) 2024-02-01 13:35:02 -06:00
settings.rs --show-settings displays active settings in a far more readable format (#9464) 2024-01-12 14:30:29 -05:00