ruff/crates/ruff_linter
Hoël Bagard e944c16c46
[pycodestyle] Do not ignore lines before the first logical line in blank lines rules (#10382)
## 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
2024-03-14 14:05:24 +05:30
..
resources [pycodestyle] Do not ignore lines before the first logical line in blank lines rules (#10382) 2024-03-14 14:05:24 +05:30
src [pycodestyle] Do not ignore lines before the first logical line in blank lines rules (#10382) 2024-03-14 14:05:24 +05:30
__init__.py [pylint] (Re-)Implement import-private-name (C2701) (#9553) 2024-01-16 14:03:11 -05:00
Cargo.toml Bump version to v0.3.2 (#10304) 2024-03-09 00:24:22 +00:00