Skip to content

Commit bb12076

Browse files
committed
Add io.StringIO() for console output capture in ConsoleFormatter
1 parent e657fae commit bb12076

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/llm_authz_audit/output/console.py

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

33
from __future__ import annotations
44

5+
import io
56
from collections import defaultdict
67

78
from rich.console import Console
@@ -39,7 +40,7 @@ def _section_box(title: str) -> Panel:
3940

4041
class ConsoleFormatter(BaseFormatter):
4142
def format(self, result: ScanResult) -> str:
42-
console = Console(record=True, width=120)
43+
console = Console(record=True, width=120, file=io.StringIO())
4344

4445
# ── Findings ──
4546
if not result.findings:

0 commit comments

Comments
 (0)