[pydocstyle] Re-implement last-line-after-section (D413) (#9654)

## Summary

This rule was just incorrect, it didn't match the examples in the docs.
(It's a very rarely-used rule since it's not included in any of the
conventions.)

Closes https://github.com/astral-sh/ruff/issues/9452.
This commit is contained in:
Charlie Marsh 2024-01-26 11:30:59 -08:00 committed by GitHub
parent d496c164d3
commit 157d5bacfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 304 additions and 9 deletions

View file

@ -20,6 +20,7 @@ mod tests {
#[test_case(Rule::BlankLineAfterLastSection, Path::new("sections.py"))]
#[test_case(Rule::NoBlankLineAfterSection, Path::new("sections.py"))]
#[test_case(Rule::BlankLineAfterLastSection, Path::new("D413.py"))]
#[test_case(Rule::BlankLineAfterSummary, Path::new("D.py"))]
#[test_case(Rule::NoBlankLineBeforeSection, Path::new("sections.py"))]
#[test_case(Rule::CapitalizeSectionName, Path::new("sections.py"))]