Skip to content

Commit 5c79d2f

Browse files
committed
fix: resolve W504 line break after binary operator CI error
1 parent 3f4731f commit 5c79d2f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

trpc_agent_sdk/tools/safety/_scanner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ def scan(self, scan_input: SafetyScanInput) -> SafetyScanReport:
157157
))
158158

159159
duration_ms = (time.perf_counter() - t0) * 1000.0
160+
blocklist_detail = (" Blocklist pattern matched — denied." if blocklist_hit else " Denied for safety.")
160161
return SafetyScanReport(
161162
tool_name=scan_input.tool_name,
162163
script_type=scan_input.script_type,
163164
script_size_lines=script_lines,
164165
decision=Decision.DENY,
165166
risk_level=RiskLevel.CRITICAL if blocklist_hit else RiskLevel.HIGH,
166167
findings=oversized_findings,
167-
summary=(f"{oversized_reason}." +
168-
(" Blocklist pattern matched — denied." if blocklist_hit else " Denied for safety.")),
168+
summary=f"{oversized_reason}." + blocklist_detail,
169169
scan_duration_ms=round(duration_ms, 2),
170170
policy_version=self._policy.content_hash,
171171
sanitized=False,

0 commit comments

Comments
 (0)