-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E303: missing detection #10374
Comments
I have tried all errors from |
Thanks for the report. From the implementation side, I guess this must be a bug in the order in which the check is performed: ruff/crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs Lines 699 to 701 in dacec73
and the state is being updated: ruff/crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs Lines 735 to 736 in dacec73
/cc @hoel-bagard |
I'll have a look at it, thanks for reporting the bug. |
Ignoring all lines until the first logical line does not match the behavior from pycodestyle. Fixes astral-sh#10374
Ignoring all lines until the first logical line does not match the behavior from pycodestyle. Fixes astral-sh#10374
…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
E303 not detected for:
flake8 detects:
:5:1: E303 too many blank lines (3)
The text was updated successfully, but these errors were encountered: