Skip to content

fix(pr-management-stats): remove unused local variable in test_ready_split.py - #959

Merged
justinmclean merged 1 commit into
apache:mainfrom
HeaTTap:fix/remove-unused-var-test-ready-split
Jul 27, 2026
Merged

fix(pr-management-stats): remove unused local variable in test_ready_split.py#959
justinmclean merged 1 commit into
apache:mainfrom
HeaTTap:fix/remove-unused-var-test-ready-split

Conversation

@HeaTTap

@HeaTTap HeaTTap commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #957

Removed the unused local variable ctx in test_render_ready_split_empty_state inside tools/pr-management-stats/tests/test_ready_split.py as render_ready_split takes the dict payload directly without needing context.

@justinmclean justinmclean left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@justinmclean
justinmclean merged commit 1adccb0 into apache:main Jul 27, 2026
9 checks passed
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.

Remove the unused local variable in test_ready_split.py

2 participants