Skip to content

Commit abb53be

Browse files
dcjclaude
andauthored
tooling: pin the ruff rule selection and move CI to 0.16.1 (#40)
Ruff 0.16 widened its default lint selection (UP, LOG, BLE, I, RUF and more) and began formatting Python code blocks embedded in Markdown. The result was that an unchanged codebase reported 0 or 381 violations depending only on which ruff you ran, and four docs files showed phantom format diffs locally that CI never saw. Declare select = ["E4", "E7", "E9", "F"] explicitly so the project's rule set no longer depends on ruff's shifting defaults, exclude Markdown from check and format, and bump the CI pin. Verified clean on BOTH 0.16.1 and 0.15.21 with no source changes, so widening the rule set stays a deliberate act rather than an upgrade side-effect. Also adds .DS_Store to .gitignore; it was absent, which is why stray copies sat untracked in the working tree. Closes #39. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 19eef09 commit abb53be

4 files changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1414
with:
1515
python-version: "3.12"
16-
- run: pip install ruff==0.15.21
16+
- run: pip install ruff==0.16.1
1717
- run: ruff check .
1818
- run: ruff format --check .

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ htmlcov/
2828

2929
# Local config files (contain secrets)
3030
broker-cfg*.json
31+
32+
# macOS
33+
.DS_Store

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to `ebus-sdk` are recorded here. Format follows [Keep a Chan
44

55
## [Unreleased]
66

7+
### Changed
8+
9+
- Tooling: the ruff lint selection is now declared explicitly (`select = ["E4", "E7", "E9", "F"]`) rather than inherited from ruff's defaults, and CI moves from ruff 0.15.21 to 0.16.1. Ruff 0.16 widened its default selection (UP, LOG, BLE, I, RUF and more) and began formatting Python code blocks embedded in Markdown, so an unchanged codebase reported 0 or 381 violations depending only on which ruff you happened to run, and four docs files showed phantom format diffs locally that CI never saw. Pinning the set decouples "what this project lints for" from "what version of ruff is installed"; `extend-exclude = ["*.md"]` keeps prose out of both check and format. Verified clean on both 0.16.1 and 0.15.21, with no source changes. Widening the rule set (the 381) is now a deliberate act rather than an upgrade side-effect. ([#39](https://github.com/electrification-bus/python-sdk/issues/39))
10+
711
## [0.18.1] — 2026-08-07
812

913
### Added

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,19 @@ ebus_sdk = ["py.typed"]
7474

7575
[tool.ruff]
7676
line-length = 120
77+
# Ruff 0.16 formats Python code blocks embedded in Markdown. This repo's docs are
78+
# prose that happens to contain illustrative snippets, not a formatting target, so
79+
# keep them out of both check and format.
80+
extend-exclude = ["*.md"]
7781

7882
[tool.ruff.lint]
83+
# Declared explicitly rather than inherited: ruff's default selection changed in
84+
# 0.16 (it began enforcing UP, LOG, BLE, I, RUF and more), which turned an
85+
# unchanged codebase into 381 violations depending only on which ruff you ran.
86+
# Pinning the set here decouples "what this project lints for" from "what version
87+
# of ruff you happen to have". Widening it is a deliberate act, not an upgrade
88+
# side-effect.
89+
select = ["E4", "E7", "E9", "F"]
7990
# E402: module-level imports not at top — triggered by __future__ + docstring pattern
8091
# E721: type comparison with == — intentional in datatype_from_type()
8192
ignore = ["E402", "E721"]

0 commit comments

Comments
 (0)