ci: pin black 26.3.1 across pre-commit and CI, drop Python 3.13#417
Conversation
Pre-commit pinned black 25.11.0 while CI installed latest (26.3.1), causing formatting disagreements on multiline string lists. Pin both to 26.3.1 so they never diverge. Also standardize CI on Python 3.12 only — the 3.13 matrix entry added no coverage value and was only used for quality checks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning
|
| Layer / File(s) | Summary |
|---|---|
CI job Python version consolidation .github/workflows/ci.yml |
All jobs (blocking checks, comprehensive tests, macOS tests, and coverage reporting) move from 3.13 matrix entries to fixed python-version: '3.12'. Blocking job adds explicit pip install -e ".[dev]" followed by pinned black==26.3.1 installation. |
Pre-commit black hook version update .pre-commit-config.yaml |
Black pre-commit hook bumps from 25.11.0 to 26.3.1, aligning with the pinned version used in CI. |
🎯 1 (Trivial) | ⏱️ ~3 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly and specifically describes the main changes: upgrading black to 26.3.1, pinning it across pre-commit and CI, and dropping Python 3.13 support. |
| Description check | ✅ Passed | The description provides clear context on what changed, why it was necessary (fixing formatting disagreements between versions), and includes a test plan with verification steps. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Comment @coderabbitai help to get the list of available commands and usage tips.
📈 Test Coverage Report
Coverage calculated from unit tests only |
|
🎉 This PR is included in version 2.35.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
.pre-commit-config.yamlblack==26.3.1in CI so it matches pre-commit exactlyThe root cause: pre-commit pinned black 25.11.0, but CI ran
pip install -e ".[dev]"which pulled latest black (26.3.1). The two versions disagree on multiline string list formatting, causing spurious CI failures (e.g. #416).Test plan
black --check .passes with 26.3.1 (154 files unchanged)🤖 Generated with Claude Code