tooling: Enable ruff preview rules E231, E275, E301, E305, and W391.#403
Merged
tooling: Enable ruff preview rules E231, E275, E301, E305, and W391.#403
Conversation
Closes #402. Second round of explicit preview rules, following #400 (E203/E302/E303): E231 — missing whitespace after comma (prevents dense 0,15 in arrays) E275 — missing whitespace after keyword (catches if(...) without space) E301 — blank line between methods in a class E305 — 2 blank lines after function/class definition (symmetric with E302) W391 — too many newlines at end of file Auto-fixed the 5 existing E305 violations, all in example files.
Contributor
There was a problem hiding this comment.
Pull request overview
Enables additional Ruff preview rules for whitespace/blank-line enforcement and updates example scripts to comply with the newly enabled E305 rule.
Changes:
- Added explicit Ruff preview rules: E231, E275, E301, E305, and W391 in
pyproject.toml. - Auto-fixed existing E305 violations by inserting an extra blank line after top-level function definitions in affected example files.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Enables additional explicit Ruff preview rules for whitespace/blank-line enforcement. |
| lib/wsen-pads/examples/temp_pressure_display.py | Adds a missing blank line after a top-level function to satisfy E305. |
| lib/wsen-pads/examples/pressure_trend.py | Adds a missing blank line after a top-level function to satisfy E305. |
| lib/wsen-pads/examples/altitude.py | Adds a missing blank line after a top-level function to satisfy E305. |
| lib/wsen-hids/examples/dew_point.py | Adds a missing blank line after a top-level function to satisfy E305. |
| lib/wsen-hids/examples/comfort_monitor.py | Adds a missing blank line after a top-level function to satisfy E305. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🎉 This PR is included in version 0.23.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Second round of explicit preview rules, following #400 (E203/E302/E303).
,The 5 E305 violations were in example files (
wsen-hids,wsen-pads) where a function definition was followed by module-level code with only 1 blank line.Test plan
make lintpassesmake test-mockpasses (364 passed, 2 skipped)Closes
#402