Skip to content

Commit 7de6d9e

Browse files
committed
chore(improve): iteration 20/130 — dependencies (cycle 2)
Eliminate redundant hooks_common re-imports in hooks_read.py, hooks_edit.py, and hooks_session.py; consolidate duplicate module lookups into single import sites.
1 parent c434021 commit 7de6d9e

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

‎src/token_goat/hooks_edit.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44
from typing import Any
55

66
from . import paths
7-
from .hooks_common import CONTINUE, get_tool_input
8-
from .hooks_common import LOG as _LOG
7+
from .hooks_common import (
8+
CONTINUE,
9+
get_tool_input,
10+
)
11+
from .hooks_common import (
12+
LOG as _LOG,
13+
)
914

1015

1116
def _nudge_worker_if_down() -> None:

‎src/token_goat/hooks_read.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
get_tool_input,
1111
pre_tool_use_with_context,
1212
pre_tool_use_with_update,
13+
) # noqa: E402
14+
from .hooks_common import (
15+
LOG as _LOG,
1316
)
14-
from .hooks_common import LOG as _LOG
1517

1618

1719
def _handle_bash_read_equivalent(payload: dict[str, Any]) -> dict[str, Any] | None:

‎src/token_goat/hooks_session.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
from pathlib import Path
55
from typing import Any
66

7-
from .hooks_common import CONTINUE
8-
from .hooks_common import LOG as _LOG
7+
from .hooks_common import (
8+
CONTINUE,
9+
)
10+
from .hooks_common import (
11+
LOG as _LOG,
12+
)
913
from .project import Project, find_project
1014

1115

0 commit comments

Comments
 (0)