style: reformat classify_documents.py to satisfy CI-pinned ruff 0.13.1#137
Merged
FlowElement-ai merged 1 commit intomainfrom May 1, 2026
Merged
Conversation
The repo's `uv.lock` pins `ruff==0.13.1` and the fork-lite CI job runs `uv run ruff format --check .` against the whole tree. After PR #131 (``dict.fromkeys`` autofix) was merged via a different ruff version, the 16-element ``_IMAGE_EXTS`` list ended up on a single line that exceeds the project's 120-char limit. ruff 0.13.1 wants the list re-expanded; the resulting drift was silently breaking every subsequent fork PR's ``Fork PR lightweight checks`` step (observed on PRs #131, #134, #135). Re-run ``ruff==0.13.1 format`` on the file. Tree is now ``1061 files already formatted`` under the locked ruff version.
3 tasks
FlowElement-ai
added a commit
that referenced
this pull request
May 1, 2026
…t upper bound (#142) `pyproject.toml` declared `ruff>=0.9.0,<=0.15.10` but `uv.lock` was still pinned at 0.13.1, releases behind. Contributors who installed ruff manually (or whose editor picked up a newer ruff) ran format autofixes that 0.13.1 would refuse, producing CI noise on every fork PR even when the code was logically correct. This was the direct root cause of: - PR #137 (the one-off `classify_documents.py` reformat I had to land) - The persistent `Fork PR lightweight checks` failures on PR #131, #134, and #135 — all caused by `ruff==0.13.1` reformatting files the contributors' newer ruff considered correct - Several earlier rounds of "fork-lite is red even though the diff looks fine" debugging `uv lock --upgrade-package ruff` snaps the lock file to the constraint ceiling (0.15.10). Verification on main: - `ruff==0.15.10 format --check .` → 1061 files already formatted - `ruff==0.15.10 check .` → all checks passed So the upgrade introduces zero source code change and aligns the CI ruff with what contributors and their editors are running. Co-authored-by: Junting Hua <juntinghua@Juntings-MacBook-Pro.local>
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
Unblocks the Fork PR lightweight checks CI gate that has been silently failing on every recent fork PR (e.g. #131, #134, #135).
Root cause
uv.lockpins ruff 0.13.1, and.github/workflows/test_suites.yml::fork-literunsuv run ruff format --check .over the whole tree. After PR #131'sdict.fromkeysautofix landed (using a newer ruff locally), the 16-element_IMAGE_EXTSlist ended up on a single line that exceeds the project's 120-char limit. ruff 0.13.1 wants that list re-expanded.Because the format drift is on a file that no fork PR is touching, every subsequent fork PR fails the same
ruff format --checkstep on a file unrelated to its changes.Fix
Run
ruff==0.13.1 formaton the file. After this PR the entire tree reports1061 files already formattedunder the locked ruff version.Test plan
uv run --no-project --with "ruff==0.13.1" ruff format --check .→ all files cleanuv run --no-project --with "ruff==0.13.1" ruff check .→ all checks passedI affirm that all code in every commit of this pull request conforms to the terms of the M-flow Developer Certificate of Origin.
Made with Cursor