fix(pr-management-stats): remove unused local variable in test_ready_split.py - #959
Conversation
There was a problem hiding this comment.
Thanks for the fix.
Looking deeper I found another issue that you might also want to fix.
This defect existed because nothing in the repo could have caught it.
tools/dev/run-workspace-check.sh selects members for ruff by auto-discovery: ruff → runs only on members with [tool.ruff]. tools/pr-management-stats/pyproject.toml has no [tool.ruff] section, so workspace-ruff-check and workspace-ruff-format skip the member entirely. An unused local is ruff's F841, which is in the default rule set, so a linted member would have failed on this line the day it landed.
Three of the thirty workspace members are in that position:
tools/agent-isolation
tools/jira
tools/pr-management-stats
All three pin ruff in their dev dependency group, so the intent to lint them is clearly there. None uses the documented [tool.magpie.checks] skip opt-out, which is what a deliberate exemption would look like. This is silent drift of exactly the kind the workspace-membership guard was built to prevent, one layer down: the member is in [tool.uv.workspace] members, so check-workspace-members is satisfied, but the per-check auto-discovery still drops it.
Suggested follow-up: add [tool.ruff] to the three members and fix whatever that surfaces.
Fixes #957
Removed the unused local variable
ctxintest_render_ready_split_empty_stateinsidetools/pr-management-stats/tests/test_ready_split.pyasrender_ready_splittakes the dict payload directly without needing context.