Implement remaining `pycodestyle` rules
- Dominant language
- Rust
- Stars
- 49.7k
- Forks
- 2.4k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 458
Description
Note: some of the checked-off rules are still gated behind the `logical_lines` feature flag. To see the list of rules enabled in the current release, refer to the [docs](https://github.com/charliermarsh/ruff#error-e).
## E1 Indentation
- [x] `E101` ("indentation contains mixed spaces and tabs")
- [x] `E111` ("indentation is not a multiple of four")
- [x] `E112` ("expected an indented block")
- [x] `E113` ("unexpected indentation")
- [x] `E114` ("indentation is not a multiple of four (comment)")
- [x] `E115` ("expected an indented block (comment)")
- [x] `E116` ("unexpected indentation (comment)")
- [x] `E117` ("over-indented")
- [ ] `E122` ("continuation line missing indentation or outdented")
- [ ] `E124` ("closing bracket does not match visual indentation")
- [ ] `E125` ("continuation line with same indent as next logical line")
- [ ] `E127` ("continuation line over-indented for visual indent")
- [ ] `E128` ("continuation line under-indented for visual indent")
- [ ] `E129` ("visually indented line with same indent as next logical line")
- [ ] `E131` ("continuation line unaligned for hanging indent")
## E2 Whitespace
- [x] `E201` ("whitespace after ‘(’")
- [x] `E202` ("whitespace before ‘)’")
- [x] `E203` ("whitespace before ‘,’, ‘;’, or ‘:’")
- [x] `E211` ("whitespace before ‘(’")
- [x] `E221` ("multiple spaces before operator")
- [x] `E222` ("multiple spaces after operator")
- [x] `E223` ("tab before operator")
- [x] `E224` ("tab after operator")
- [x] `E225` ("missing whitespace around operator")
- [x] `E227` ("missing whitespace around bitwise or shift operator")
- [x] `E228` ("missing whitespace around modulo operator")
- [x] `E231` ("missing whitespace after ‘,’, ‘;’, or ‘:’")
- [x] `E251` ("unexpected spaces around keyword / parameter equals")
- [x] `E261` ("at least two spaces before inline comment")
- [x] `E262` ("inline comment should start with ‘# ‘")
- [x] `E265` ("block comment should start with ‘# ‘")
- [x] `E266` ("too many leading ‘#’ for block comment")
- [x] `E271` ("multiple spaces after keyword")
- [x] `E272` ("multiple spaces before keyword")
- [x] `E273` ("tab after keyword")
- [x] `E274` ("tab before keyword")
- [x] `E275` ("missing whitespace after keyword")
## E3 Blank line
- [x] `E301` ("expected 1 blank line, found 0")
- [x] `E302` ("expected 2 blank lines, found 0")
- [x] `E303` ("too many blank lines (3)")
- [x] `E304` ("blank lines found after function decorator")
- [x] `E305` ("expected 2 blank lines after end of function or class")
- [x] `E306` ("expected 1 blank line before a nested definition")
## E4 Import
- [x] `E401` ("multiple imports on one line")
- [x] `E402` ("module level import not at top of file")
## E5 Line length
- [x] `E501` ("line too long (82 > 79 characters)")
- [x] `E502` ("the backslash is redundant between brackets")
## E7 Statement
- [x] `E701` ("multiple statements on one line (colon)")
- [x] `E702` ("multiple statements on one line (semicolon)")
- [x] `E703` ("statement ends with a semicolon")
- [ ] `E704` ("multiple statements on one line (def)")
- [x] `E711` ("comparison to None should be ‘if cond is None:’")
- [x] `E712` ("comparison to True should be ‘if cond is True:’ or ‘if cond:’")
- [x] `E713` ("test for membership should be ‘not in’")
- [x] `E714` ("test for object identity should be ‘is not’")
- [x] `E721` ("do not compare types, use ‘isinstance()’")
- [x] `E722` ("do not use bare except, specify exception instead")
- [x] `E731` ("do not assign a lambda expression, use a def")
- [x] `E741` ("do not use variables named ‘l’, ‘O’, or ‘I’")
- [x] `E742` ("do not define classes named ‘l’, ‘O’, or ‘I’")
- [x] `E743` ("do not define functions named ‘l’, ‘O’, or ‘I’")
## E9 Runtime
- [x] `E901` ("SyntaxError or IndentationError")
- [x] `E902` ("IOError")
## W1 Indentation warning
- [x] `W191` ("indentation contains tabs")
## W2 Whitespace warning
- [x] `W291` ("trailing whitespace")
- [x] `W292` ("no newline at end of file")
- [x] `W293` ("blank line contains whitespace")
## W3 Blank line warning
- [x] `W391` ("blank line at end of file")
## W5. Line break warning
- [x] `W505` ("doc line too long (82 > 79 characters)")
## W6 Deprecation warning
- [x] `W605` ("invalid escape sequence ‘x’")
Contributor guide
Research direction
Review the unchecked E122, E124, E125, E127, E128, E129, E131, and E704 rules in the issue, then consult the linked Ruff documentation for the current rule set. Identify the relevant implementation and test entry points from the repository before starting. Done means the remaining rules are implemented and their behavior is covered consistently with the existing rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100