Repository navigation
style: format with black to unblock CI lint gate - #17
Merged
Merged
Conversation
Applies black 26.5.1 (unpinned in CI, resolved to latest at run time) using the repo's tool.black config (line-length 100, target-version py310/py311/py312) across the exact paths CI checks: pm_bot, run_bot.py, scripts, tests. 24 files reformatted, mechanical only. Verified: AST of every changed file is identical before and after (ast.dump comparison), black --check and ruff check both pass, and the local test suite (16 tests) still passes. No behavior change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ST4EyP7XFr92rgawwPJC1
Adds .git-blame-ignore-revs listing the black reformat commit (c370d54) so `git blame` and GitHub's web blame skip past it to the line's real authorship commit. The file alone does nothing locally: it only takes effect after running `git config blame.ignoreRevsFile .git-blame-ignore-revs` (a one-time per-clone setting), or by passing --ignore-revs-file explicitly. A note to that effect is added next to [tool.black] in pyproject.toml. Verified with `git blame -L` on a line the reformat commit touched: without the config it attributes to the reformat commit, with it the attribution falls back to the original commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ST4EyP7XFr92rgawwPJC1
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
The "Lint (ruff + black)" CI job has been failing at step 6 ("Black check") on every PR, unrelated to what any PR actually changes. This is why #15 (54 days open, the oldest open PR in the fleet) and #16 (23 days) are blocked, even though both are clean workflow-version bumps with green tests and mypy. This PR fixes only the formatting drift so that gate goes green again.
What was done
blackacross the exact paths the CI lint job checks (pm_bot run_bot.py scripts tests) and committed the result as a standalone mechanical commit..git-blame-ignore-revssogit blame(and GitHub's web blame) skips that reformat commit and falls back to the line's real authorship commit.Black version and settings
.github/workflows/ci.ymlline 30 installs black withpip install ruff black, i.e. no version is pinned -- CI always resolves whatever is current on PyPI at run time. I installed the same way and got black 26.5.1, which is what a CI run today would also get. Settings come from[tool.black]inpyproject.toml:line-length = 100,target-version = ["py310", "py311", "py312"],extend-excludefor.mypy_cacheandkalshi_edge_finder.py. Noskip-string-normalization, so black's default quote normalization applies.I ran black on CI's exact path list (
pm_bot run_bot.py scripts tests), notblack .on the whole repo, so the diff matches exactly what the Black check step evaluates -- nothing outside that scope was touched.Verification (all local, all green)
ast.dump, attributes excluded) -- every file is AST-identical. This is the strongest evidence the change is purely cosmetic.black --check pm_bot run_bot.py scripts tests: passes, "38 files would be left unchanged."ruff check pm_bot run_bot.py scripts tests(ruff 0.16.9, also unpinned in CI, same resolution logic as black): passes, "All checks passed!" -- black did not introduce anything ruff objects to, so no ruff-driven fixes were needed.pytest tests/ -q-- 16 passed. Note: run locally on Python 3.13 (only Python available on this machine), not the 3.10/3.11/3.12 matrix CI runs; I did not have a way to run the full matrix locally. The reformat is AST-identical so there's no version-specific behavior at risk, but flagging this rather than implying the full matrix ran.Important: how this PR must be merged
.git-blame-ignore-revsreferences the formatting commit's SHA directly. This PR must be merged with "Create a merge commit," not squash or rebase. Squash or rebase merging rewrites/discards that SHA onmain, and the blame-ignore file would point at a commit that never lands there, silently going dead on arrival. The repo currently has all three merge methods enabled.To use it after merge (once, per clone):
A note to this effect is also added next to
[tool.black]inpyproject.toml.Unblocks
#15 and #16 are both blocked solely by this pre-existing, content-unrelated formatting failure. Once this merges (as a merge commit) and
mainis green, rebasing/updating those two PRs should let their own checks pass on the current formatting baseline.🤖 Generated with Claude Code
https://claude.ai/code/session_014ST4EyP7XFr92rgawwPJC1