mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 14:52:01 +00:00
![]() ## Summary Ignoring all lines until the first logical line does not match the behavior from pycodestyle. This PR therefore removes the `if state.is_not_first_logical_line` skipping the line check before the first logical line, and applies it only to `E302`. For example, in the snippet below a rule violation should be detected on the second comment and on the import. ```python # first comment # second comment import foo ``` Fixes #10374 ## Test Plan Add test cases, update the snapshots and verify the ecosystem check output |
||
---|---|---|
.. | ||
resources | ||
src | ||
__init__.py | ||
Cargo.toml |