Skip to content

Commit 244fa28

Browse files
nhortonclaude
andcommitted
Fix ruff linting errors in test_hook_wrapper.py
- Remove unused imports (pytest, NORMALIZED_TO_TOOL) - Prefix unused loop variables with underscore - Remove f-string prefix from string without placeholders Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b1d6907 commit 244fa28

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/unit/test_hook_wrapper.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@
66

77
import json
88

9-
import pytest
10-
119
from deepwork.hooks.wrapper import (
1210
EVENT_TO_NORMALIZED,
1311
NORMALIZED_TO_EVENT,
14-
NORMALIZED_TO_TOOL,
1512
TOOL_TO_NORMALIZED,
1613
HookInput,
1714
HookOutput,
@@ -347,7 +344,7 @@ def test_all_gemini_events_have_normalized_mapping(self) -> None:
347344

348345
def test_normalized_to_event_roundtrip_claude(self) -> None:
349346
"""Test that Claude events can be normalized and denormalized."""
350-
for platform_event, normalized in EVENT_TO_NORMALIZED[Platform.CLAUDE].items():
347+
for _platform_event, normalized in EVENT_TO_NORMALIZED[Platform.CLAUDE].items():
351348
if normalized in NORMALIZED_TO_EVENT[Platform.CLAUDE]:
352349
# SubagentStop maps to AFTER_AGENT but denormalizes to Stop
353350
denormalized = NORMALIZED_TO_EVENT[Platform.CLAUDE][normalized]
@@ -360,13 +357,13 @@ class TestToolMappings:
360357

361358
def test_claude_tools_normalize_to_snake_case(self) -> None:
362359
"""Test Claude tool names normalize to snake_case."""
363-
for claude_tool, normalized in TOOL_TO_NORMALIZED[Platform.CLAUDE].items():
360+
for _claude_tool, normalized in TOOL_TO_NORMALIZED[Platform.CLAUDE].items():
364361
assert "_" in normalized or normalized.islower(), f"{normalized} should be snake_case"
365362

366363
def test_gemini_tools_are_already_snake_case(self) -> None:
367364
"""Test Gemini tool names are already snake_case."""
368365
for gemini_tool, normalized in TOOL_TO_NORMALIZED[Platform.GEMINI].items():
369-
assert gemini_tool == normalized, f"Gemini tools should be identity mapping"
366+
assert gemini_tool == normalized, "Gemini tools should be identity mapping"
370367

371368
def test_common_tools_map_to_same_normalized_name(self) -> None:
372369
"""Test that common tools map to the same normalized name across platforms."""

0 commit comments

Comments
 (0)