Skip to content

style: apply ruff 0.15.2 formatting to drifted files (unblocks CI format check)#207

Open
wernerkasselman-au wants to merge 1 commit into
NVIDIA:mainfrom
wernerkasselman-au:style/ruff-format-static-runner
Open

style: apply ruff 0.15.2 formatting to drifted files (unblocks CI format check)#207
wernerkasselman-au wants to merge 1 commit into
NVIDIA:mainfrom
wernerkasselman-au:style/ruff-format-static-runner

Conversation

@wernerkasselman-au

Copy link
Copy Markdown
Contributor

What this fixes

The CI ruff format --check src/ tests/ job is currently failing on main, not on any one PR. Four files were committed under an older ruff and no longer match ruff format under the version this repo now pins (ruff>=0.15.0 in pyproject.toml, which uv.lock resolves to 0.15.2), so the format job reports them as needing reformatting and exits non-zero. Because that check runs over the whole tree, every open PR inherits the red job regardless of what it changes. I hit it while getting CI green on two unrelated fixes (#204, #205), and it traces back to main itself.

The change

uv run ruff format src/ tests/, nothing more. It touches exactly the four drifted files and leaves the other 120 untouched:

  • src/skillspector/nodes/analyzers/static_runner.py (a hand-condensed frozenset({...}) literal that 0.15.2 expands one element per line)
  • tests/nodes/analyzers/test_binary_and_pe3_filtering.py
  • tests/nodes/analyzers/test_mp2_regex_backtracking.py
  • tests/nodes/test_llm_analyzer_base.py

No behaviour change: ruff format only adjusts whitespace and literal layout. I kept it to formatting on purpose so it is a safe, reviewable catch-up rather than mixing in anything else.

Verification

uv run ruff format --check src/ tests/   # 124 files already formatted (was: 4 would reformat)
uv run ruff check src/ tests/            # All checks passed
uv run pytest tests/nodes/analyzers/test_binary_and_pe3_filtering.py \
              tests/nodes/analyzers/test_mp2_regex_backtracking.py \
              tests/nodes/test_llm_analyzer_base.py -q   # 147 passed

If you would rather pin ruff to an exact version (so a future ruff bump does not re-introduce this drift on a >= floor), I am happy to follow up with that separately; this PR just restores the clean check against the version already in the lock.

Four files were committed under an older ruff and no longer match `ruff format`
under the pinned ruff 0.15.2 (uv.lock), so the CI `ruff format --check src/ tests/`
job fails on main and on every PR branch regardless of its content. Reformat them
to restore a clean check.

No behaviour change: ruff format only adjusts whitespace and literal layout (for
example, expanding a hand-condensed frozenset literal one element per line).

Files: src/skillspector/nodes/analyzers/static_runner.py,
tests/nodes/analyzers/test_binary_and_pe3_filtering.py,
tests/nodes/analyzers/test_mp2_regex_backtracking.py,
tests/nodes/test_llm_analyzer_base.py.

Signed-off-by: Werner Kasselman <145896621+wernerkasselman-au@users.noreply.github.com>
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