[E301] Failing to catch blank lines above classmethods when compared to pycodestyle #10114
Labels
bug
Something isn't working
help wanted
Contributions especially welcome
preview
Related to preview mode features
The closest I could find to this is #10039, but it appears to be a bit different, as it is talking about conflicts with format on pyi files, but this is impacting regular files and specifically classmethods. I also saw E301 mentioned in #10032 as potentially superfluous with formatter, but I don't see it listed in documentation as having conflicts. Blank line spacing around the E rules is also discussed in some PRs like #8720, but they do not appear to cover this specific scenario. I believe it should still be able to be caught when format is not used for parity with pycodestyle, which does catch these.
pyproject.toml
Python file
pycodestyle 2.11.1 catching all 4
ruff 0.2.2 catching 2/4
To note, if using ruff format, it would fix all 4. If you are only using ruff as a replacement for pycodestyle without format however, then you would hit this miss without pycodestyle.
I see E301 is in preview, but this does not appear to be intentional based on pycodestyle behavior, and it working with regular methods. I also did not see any configuration options to change this behavior, but please let me know if I am overlooking something. Thanks!
The text was updated successfully, but these errors were encountered: