mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:43 +00:00
![]() ## Summary Fixes https://github.com/astral-sh/ruff/issues/10039 The [recommendation for typing stub files](https://typing.readthedocs.io/en/latest/source/stubs.html#blank-lines) is to use **one** blank line to group related definitions and otherwise omit blank lines. The newly added blank line rules (`E3*`) didn't account for typing stub files and enforced two empty lines at the top level and one empty line otherwise, making it impossible to group related definitions. This PR implements the `E3*` rules to: * Not enforce blank lines. The use of blank lines in typing definitions is entirely up to the user. * Allow at most one empty line, including between top level statements. ## Test Plan Added unit tests (It may look odd that many snapshots are empty but the point is that the rule should no longer emit diagnostics) |
||
---|---|---|
.. | ||
test | ||
__init__.py |