refactor: drop an unused attribute and redundant exception checks
Merged
GL
9d ago+3+3+0123456789-8-8-0123456789
What
StackOneToolSet._execute_configwas assigned in__init__and never read anywhere (grep -rn _execute_config stackone_aifinds only that line intoolset.py; the other hits are the unrelatedStackOneTool._execute_config). Two tests intests/test_integrations_pydantic_ai.pystill assigned it with atype: ignore; those lines set nothing the code reads and are removed too (second commit).account_idsandtimeoutare still read from theexecuteargument.ToolsetErrorsubclassesStackOneError(types.py:89), soexcept (ToolsetError, StackOneError)intoolset.pyandisinstance(current, StackOneError | ToolsetError)intools.pyare the same asStackOneErroralone. The twoToolsetErrorimports then go unused (ruff F401).
No behaviour change.
How verified
uv run ruff check .,uv run ruff format --check .: cleanuv run ty check stackone_ai examples: All checks passeduv run pytest(Python 3.13, MCP mock via pnpm): 871 passeduv run pytest tests/test_integrations_pydantic_ai.pyafter the test cleanup: 13 passed
Gates (head 5f84c60)
| Gate | Result |
|---|---|
| Repo skills | none in repo |
| /forge:forge | ran on ef8dd6d: no change; re-run on 5f84c60: +3 -8, 0 comment lines, 0 copies |
| Security scan | security-reviewer agent: no finding at confidence 70 or above. Aikido: 31 open issues on main (lockfile CVEs, workflow SAST, one old test-fixture secret), none on lines this PR changes |
| Codex security | clean on ef8dd6d (job 284aa7c6) and 5f84c60 (job b2f55e81) |
| /security-review | ran: secrets, input validation, transport and DoS items clean; the server-side items do not apply to an SDK |
| /code-review | medium on ef8dd6d: no correctness bugs. Fixed 1: the account_ids test is renamed for what it checks (precedence of configured accounts is covered by test_execute_config_account_ids_scope_the_catalog_fetch) |
| CI | green on 5f84c60: 10 pass, 3 skipped |
| Unresolved review threads | 0 |
Requested by guillaume@stackone.com in Slack (repo audit thread).
š¤ Generated with Claude Code
Summary by cubic
Removes dead code from the tool classes: StackOneToolSet._execute_config was assigned in __init__ but never read, and exception handling that caught ToolsetError alongside StackOneError was redundant because ToolsetError subclasses StackOneError. The now-unused ToolsetError imports are dropped, and tests no longer assign the removed attribute. No behavior change; ruff, ty, and the full test suite (871 passed) remain clean.