Skip to content

Commit 21be3d1

Browse files
stephentoubCopilot
andcommitted
Use single-underscore discard for awaited results
CodeQL flagged the named `_result`/`_captured_permission_request` discards as unused locals after the prior commit. Switch to the single-underscore convention, which CodeQL's py/unused-local-variable rule and ruff F841 both treat as an intentional discard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 60868d7 commit 21be3d1

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

python/e2e/test_pending_work_resume_e2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def original_tool_handler(args):
159159
await session1.send(
160160
"Use resume_permission_tool with value 'alpha', then reply with the result."
161161
)
162-
_captured_permission_request = await captured_request
162+
_ = await captured_request
163163
permission_event = await permission_event_task
164164

165165
# Force-stop the suspended client without releasing the in-flight

python/e2e/test_rpc_mcp_and_skills_e2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _assert_skill(skills, skill_name: str, *, enabled: bool):
6161

6262
async def _assert_failure(awaitable, expected: str) -> None:
6363
with pytest.raises(Exception) as excinfo:
64-
_result = await awaitable
64+
_ = await awaitable
6565
assert expected.lower() in str(excinfo.value).lower()
6666

6767

python/e2e/test_rpc_session_state_e2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _conversation_messages(events) -> list[tuple[str, str]]:
4343

4444
async def _assert_implemented_failure(awaitable, method: str) -> None:
4545
with pytest.raises(Exception) as excinfo:
46-
_result = await awaitable
46+
_ = await awaitable
4747
assert f"Unhandled method {method}".lower() not in str(excinfo.value).lower()
4848

4949

python/e2e/test_rpc_tasks_and_handlers_e2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
async def _assert_implemented_failure(awaitable, method: str) -> None:
3434
with pytest.raises(Exception) as excinfo:
35-
_result = await awaitable
35+
_ = await awaitable
3636
assert f"Unhandled method {method}".lower() not in str(excinfo.value).lower()
3737

3838

0 commit comments

Comments
 (0)