Skip to content

ci: pin black 26.3.1 across pre-commit and CI, drop Python 3.13#417

Merged
jeremyeder merged 1 commit into
ambient-code:mainfrom
jeremyeder:fix/black-version-skew
May 12, 2026
Merged

ci: pin black 26.3.1 across pre-commit and CI, drop Python 3.13#417
jeremyeder merged 1 commit into
ambient-code:mainfrom
jeremyeder:fix/black-version-skew

Conversation

@jeremyeder
Copy link
Copy Markdown
Contributor

Summary

  • Upgrade black from 25.11.0 to 26.3.1 in .pre-commit-config.yaml
  • Pin black==26.3.1 in CI so it matches pre-commit exactly
  • Drop Python 3.13 from CI matrix — standardize on 3.12 only

The 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)
  • CI passes on this PR (single 3.12 job, pinned black)

🤖 Generated with Claude Code

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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: String must contain at most 250 character(s) at "tone_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 0445a409-8ab4-4e16-9827-c819e6492991

📥 Commits

Reviewing files that changed from the base of the PR and between 9ada97c and 65a7702.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • .pre-commit-config.yaml

Walkthrough

CI and pre-commit configurations are updated to standardize on Python 3.12 (replacing a 3.12/3.13 matrix) and black formatter version 26.3.1. The blocking CI job now explicitly installs black 26.3.1 after dev dependencies.

Changes

Python and Black Version Standardization

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.

@github-actions
Copy link
Copy Markdown
Contributor

📈 Test Coverage Report

Branch Coverage
This PR 72.5%
Main 72.5%
Diff ✅ +0%

Coverage calculated from unit tests only

@jeremyeder jeremyeder merged commit 6d9af7d into ambient-code:main May 12, 2026
9 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.35.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant