Repository navigation
fix(setup): make the comdev MCP test pass ruff format and mypy - #2202
Merged
Merged
Conversation
prek on main has failed since apache#2199: ruff format wants to wrap three long lines in the isolated-setup-update comdev MCP test, and mypy rejects passing `REAL_GIT` (`str | None` from `shutil.which`) into the `subprocess.run` argument list. The test class is already skipped when git is missing, so `_git` now asserts that invariant, which narrows the type. No behaviour change: 24 passed, 1 skipped (needs zsh). Generated-by: Claude Code (Opus 5.5)
6 of 7 tasks
6 tasks done
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
prekonmainhas failed since fix(setup): resolve comdev MCP dirs from the registered index.js #2199 (f91ddf36):ruff formatwants to wrap three long lines inplugins/magpie-setup/skills/isolated-setup-update/tests/test_comdev_mcp.py, and mypy rejectsREAL_GIT(str | Nonefromshutil.which) in thesubprocess.runargument list (line 72).assert REAL_GIT is not Nonein_git. The test class is already skipped without git, so the assert only states that invariant and narrows the type. No behaviour change.Type of change
prek, workflows, validators)Test plan
tools/dev/run-workspace-check.sh ruff-format,ruffandmypypass for all members (they failed forpluginsonmainbefore the change)pytest plugins/magpie-setup/skills/isolated-setup-update/tests/test_comdev_mcp.py: 24 passed, 1 skipped (needs zsh)RFC-AI-0004 compliance
No principle touched: test formatting and typing only.
Linked issues
Fixes the
mainbreakage from #2199. Why #2199's own PR checks did not catch it is tracked in #2201.Notes for reviewers (optional)
On #2199's PR run,
ruff formatandmypyprinted "(no files to check) Skipped": theirfiles:filter only matches paths undertools/, while the test lives in thepluginsworkspace member. That gap is #2201, kept separate from this fix.Generative AI disclosure: written with help from Claude Code (Opus 5.5). I've read every line of the diff and run the checks.