Skip to content

Commit ab3f643

Browse files
committed
style(tools): fix flake8 warnings — unused imports and line length
1 parent ea7c67b commit ab3f643

6 files changed

Lines changed: 1 addition & 8 deletions

File tree

tests/tools/safety/test_filter.py

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

88
from unittest.mock import AsyncMock
99
from unittest.mock import MagicMock
10-
from unittest.mock import patch
1110

1211
import pytest
1312

tests/tools/safety/test_policy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
from trpc_agent_sdk.tools.safety._policy import (
1212
SafetyPolicy,
1313
PolicyRuleConfig,
14-
WhitelistConfig,
15-
BlocklistConfig,
1614
)
1715
from trpc_agent_sdk.tools.safety._types import RiskType, Decision, RiskLevel
1816

tests/tools/safety/test_scanner.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# tRPC-Agent-Python is licensed under Apache-2.0.
66
"""Core integration tests for the ToolSafetyScanner."""
77

8-
import pytest
9-
108
from trpc_agent_sdk.tools.safety._types import Decision
119
from trpc_agent_sdk.tools.safety._types import RiskLevel
1210
from trpc_agent_sdk.tools.safety._types import RiskType

trpc_agent_sdk/tools/safety/_audit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from datetime import datetime
1616
from datetime import timezone
1717
from pathlib import Path
18-
from typing import Optional
1918

2019
from ._types import AuditEvent
2120
from ._types import ScanReport

trpc_agent_sdk/tools/safety/_policy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"""
1010

1111
from pathlib import Path
12-
from typing import Optional
1312

1413
import yaml
1514
from pydantic import BaseModel

trpc_agent_sdk/tools/safety/_rules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class AstRule:
191191
message="Potential sensitive information exposure detected",
192192
recommendation="Do not log or output API keys, tokens, or passwords",
193193
patterns=[
194-
r"(print|write|log|logger)\.?[^(]*\([^)]*(api_key|API_KEY|password|PASSWORD|token|TOKEN|secret|SECRET|private_key|PRIVATE_KEY)",
194+
r"(print|write|log|logger)\.?[^(]*\([^)]*(api_key|API_KEY|password|PASSWORD|token|TOKEN|secret|SECRET|private_key|PRIVATE_KEY)", # noqa: E501
195195
r"(api_key|API_KEY|password|PASSWORD|token|TOKEN|secret|SECRET)\s*=\s*[^#\n]{3,}",
196196
],
197197
),

0 commit comments

Comments
 (0)