ruff/crates
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
..
ruff Make show-settings filters directory-agnostic (#9866) 2024-02-07 03:20:27 +00:00
ruff_benchmark Approximate tokens len (#9546) 2024-01-19 17:39:37 +01:00
ruff_cache Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_dev Add rule removal infrastructure (#9691) 2024-02-01 13:35:02 -06:00
ruff_diagnostics
ruff_formatter Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
ruff_index Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_linter Fix blank-line docstring rules for module-level docstrings (#9878) 2024-02-07 16:48:28 -05:00
ruff_macros Add rule removal infrastructure (#9691) 2024-02-01 13:35:02 -06:00
ruff_notebook Detect automagic-like assignments in notebooks (#9653) 2024-01-29 12:55:44 +00:00
ruff_python_ast Respect async with in timeout-without-await (#9859) 2024-02-06 12:04:24 -05:00
ruff_python_codegen
ruff_python_formatter Implement AnyNode/AnyNodeRef for FStringFormatSpec (#9836) 2024-02-05 19:23:43 +00:00
ruff_python_index Index multiline f-strings (#9837) 2024-02-05 21:25:33 -05:00
ruff_python_literal Use Rust 1.75 toolchain (#9437) 2024-01-08 18:03:16 +01:00
ruff_python_parser Index multiline f-strings (#9837) 2024-02-05 21:25:33 -05:00
ruff_python_resolver Use Rust 1.75 toolchain (#9437) 2024-01-08 18:03:16 +01:00
ruff_python_semantic Short-circuit typing matches based on imports (#9800) 2024-02-04 14:06:44 -05:00
ruff_python_stdlib Slight speed-up for lowercase and uppercase identifier checks (#9798) 2024-02-03 14:40:41 +00:00
ruff_python_trivia Add fast-path for comment detection (#9808) 2024-02-05 11:00:18 -05:00
ruff_shrinking Bump version to v0.2.1 (#9843) 2024-02-05 15:31:05 -05:00
ruff_source_file Fix blank-line docstring rules for module-level docstrings (#9878) 2024-02-07 16:48:28 -05:00
ruff_text_size Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
ruff_wasm Deduplicate deprecation warnings for v0.2.0 release (#9764) 2024-02-01 17:10:24 -06:00
ruff_workspace Fix typo in option name: output_format -> output-format (#9874) 2024-02-07 16:17:58 +00:00