Skip to content

Commit 86825ee

Browse files
committed
style(safety): 移除未使用的 import 修复 Flake8 警告
1 parent c91f871 commit 86825ee

5 files changed

Lines changed: 0 additions & 9 deletions

File tree

trpc_agent_sdk/tools/safety/_bash_scanner.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
import re
1616
from typing import Optional
1717

18-
from trpc_agent_sdk.log import logger
19-
2018
from ._policy import SafetyPolicy
2119
from ._types import RiskCategory
2220
from ._types import RiskLevel

trpc_agent_sdk/tools/safety/_policy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
import yaml
2828

29-
from trpc_agent_sdk.log import logger
30-
3129
from ._types import RiskLevel
3230
from ._types import SafetyDecision
3331

trpc_agent_sdk/tools/safety/_safety_filter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
from ._audit import AuditLogger
3535
from ._policy import SafetyPolicy
3636
from ._scanner import SafetyScanner
37-
from ._types import SafetyDecision
3837
from ._types import SafetyReport
3938
from ._types import ScanInput
4039
from ._types import ScriptType

trpc_agent_sdk/tools/safety/_scanner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import datetime
1717
import time
18-
from typing import Optional
1918

2019
from trpc_agent_sdk.log import logger
2120

trpc_agent_sdk/tools/safety/_wrapper.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@
3939
from ._audit import AuditLogger
4040
from ._policy import SafetyPolicy
4141
from ._scanner import SafetyScanner
42-
from ._types import SafetyReport
4342
from ._types import ScanInput
4443
from ._types import ScriptType
45-
from ._types import SafetyDecision
4644

4745
_DEFAULT_POLICY_PATH = os.path.join(
4846
os.path.dirname(os.path.abspath(__file__)),
@@ -185,7 +183,6 @@ def scan_only(
185183
Returns:
186184
The SafetyReport dict.
187185
"""
188-
import asyncio # noqa: E811
189186
st = self._parse_script_type(script_type)
190187
scan_input = ScanInput(
191188
script_content=script_content,

0 commit comments

Comments
 (0)