Context
Follow-up to #400 which enabled E203, E302, E303. Additional preview rules in the E/W group remain inactive due to explicit-preview-rules = true and would catch issues seen in recent PRs.
Rules to enable
| Rule |
Description |
Current violations |
Why |
| E231 |
Missing whitespace after , |
0 |
Prevents dense 0,15 in sprite arrays (seen in PR #399 before correction) |
| E275 |
Missing whitespace after keyword |
0 |
Catches if(...) / for(...) without space |
| E301 |
Blank line between methods |
0 |
Catches class methods with no separator |
| E305 |
2 blank lines after function/class definition |
5 |
Symmetric with E302 — catches def foo(): ... \n code with only 1 blank line |
| W391 |
Too many newlines at end of file |
0 |
Trailing blank lines cleanup |
Fix
Add all five to the explicit select list in pyproject.toml and auto-fix the 5 existing E305 violations (all in example files: wsen-hids/examples/comfort_monitor.py, wsen-hids/examples/dew_point.py, wsen-pads/examples/altitude.py, wsen-pads/examples/pressure_trend.py, wsen-pads/examples/temp_pressure_display.py).
Related
Context
Follow-up to #400 which enabled E203, E302, E303. Additional preview rules in the E/W group remain inactive due to
explicit-preview-rules = trueand would catch issues seen in recent PRs.Rules to enable
,0,15in sprite arrays (seen in PR #399 before correction)if(...)/for(...)without spacedef foo(): ... \n codewith only 1 blank lineFix
Add all five to the explicit select list in
pyproject.tomland auto-fix the 5 existing E305 violations (all in example files:wsen-hids/examples/comfort_monitor.py,wsen-hids/examples/dew_point.py,wsen-pads/examples/altitude.py,wsen-pads/examples/pressure_trend.py,wsen-pads/examples/temp_pressure_display.py).Related