Skip to content

Commit 4f8bc30

Browse files
committed
CM-60929-deepcopy
1 parent 143e881 commit 4f8bc30

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cycode/cli/apps/ai_guardrails/consts.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
import platform
9+
from copy import deepcopy
910
from enum import Enum
1011
from pathlib import Path
1112
from typing import NamedTuple
@@ -123,17 +124,17 @@ def _get_claude_code_hooks_config(async_mode: bool = False) -> dict:
123124
],
124125
'UserPromptSubmit': [
125126
{
126-
'hooks': [hook_entry.copy()],
127+
'hooks': [deepcopy(hook_entry)],
127128
}
128129
],
129130
'PreToolUse': [
130131
{
131132
'matcher': 'Read',
132-
'hooks': [hook_entry.copy()],
133+
'hooks': [deepcopy(hook_entry)],
133134
},
134135
{
135136
'matcher': 'mcp__.*',
136-
'hooks': [hook_entry.copy()],
137+
'hooks': [deepcopy(hook_entry)],
137138
},
138139
],
139140
},

0 commit comments

Comments
 (0)