Skip to content

Pin black and isort in requirements/test.txt for reproducible lint#680

Merged
wbarnha merged 3 commits into
masterfrom
claude/pin-lint-versions
Jul 17, 2026
Merged

Pin black and isort in requirements/test.txt for reproducible lint#680
wbarnha merged 3 commits into
masterfrom
claude/pin-lint-versions

Conversation

@wbarnha

@wbarnha wbarnha commented Jul 16, 2026

Copy link
Copy Markdown
Member

Description

black and isort were unpinned in requirements/test.txt, so CI always installed the newest release. When isort 8.0.1 and black 26.5.1 shipped, their changed formatting output began failing the Check linting job on otherwise-unchanged trees — lint started passing or failing depending only on when the job happened to run, not on the diff. This is the root cause of the recent lint red across open PRs.

This pins both formatters to the current versions (the ones the tree is expected to be formatted for), matching the existing flake8==5.0.4 pin. Bump them deliberately in future, together with a tree-wide reformat.

black==26.5.1
isort==8.0.1

Important: merge ordering

This pin does not by itself make master's lint green — master currently has formatting/E402 drift that predates this change. #677 ("Fix CI lint formatting drift in tests and aerospike store") already fixes all of it and, I verified, lints 100% clean under exactly these pinned versions (0 isort / 0 black / 0 flake8). #677 also moves the fragile pypy3.9 job to a non-required continue-on-error job.

Recommended order:

  1. Merge Fix CI lint formatting drift in tests and aerospike store #677 (greens master lint + de-blocks pypy3.9), then
  2. Merge this PR to lock the versions so a future isort/black release can't silently re-break CI.

Until #677 lands, this PR's own Check linting job will remain red (it runs against the un-reformatted master tree) — that's expected, not a problem with the pin.


Generated by Claude Code

black and isort were unpinned in requirements/test.txt, so CI always
installed the newest release. When isort 8.0.1 and black 26.5.1 shipped,
their changed formatting output started failing 'Check linting' on
otherwise-unchanged trees -- lint was passing or failing depending only
on when the job happened to run.

Pin both to the current versions (the ones the tree is already formatted
for) so linting is reproducible. Bump them deliberately, together with a
tree-wide reformat, in future.
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.09%. Comparing base (10f0f58) to head (b282d42).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #680   +/-   ##
=======================================
  Coverage   94.09%   94.09%           
=======================================
  Files         102      102           
  Lines       11108    11108           
  Branches     1198     1198           
=======================================
  Hits        10452    10452           
  Misses        557      557           
  Partials       99       99           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

wbarnha added 2 commits July 16, 2026 21:02
black 26.5.1 and isort 8.0.1 require Python >= 3.10, so pinning them
unconditionally broke 'pip install -r requirements/test.txt' on the
Python 3.9 test-matrix jobs. black/isort are lint-only and only run in
the lint job (PYTHON_LATEST), so pin them on 3.10+ and fall back to an
unpinned install on 3.9, where they are installed but never invoked.
@wbarnha
wbarnha merged commit c3c4244 into master Jul 17, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant