style: drop docstrings from the UTF-8 stream helpers

This commit is contained in:
Ahmed Allam 2026-10-03 22:07:43 +00:00 • committed by Ahmed Allam
parent 5c3476795a
commit 7280c40caa
3 changed files with 0 additions and 16 deletions

View file

@ -416,14 +416,6 @@ def _bootstrap_scan(args: argparse.Namespace) -> None:
def _force_utf8_streams() -> None:
"""Give stdout/stderr a UTF-8 encoding, whatever the console code page.
Windows hands a redirected or legacy console stream the ANSI code page
(cp1252 and friends), which cannot encode Rich's output or the model's
text: one ``\u2713`` in a finding ends a headless run with
``UnicodeEncodeError``. Streams without ``reconfigure`` (test captures,
replaced file objects) are left alone.
"""
for stream in (sys.stdout, sys.stderr):
reconfigure = getattr(stream, "reconfigure", None)
if reconfigure is None:

View file

@ -59,12 +59,6 @@ class GoTuiPreActivationError(RuntimeError):
def _open_output_sink() -> TextIO:
"""A UTF-8 ``os.devnull`` handle for Python's stdout/stderr while the Go TUI owns the terminal.
UTF-8 is explicit because the locale encoding (cp1252 on Windows) cannot take
the model's text, and a logging handler that fails to write there floods the
log with ``--- Logging error ---`` reports.
"""
return Path(os.devnull).open("a", buffering=1, encoding="utf-8")

View file

@ -1,5 +1,3 @@
"""Windows gives redirected stdout/stderr the ANSI code page; Strix forces UTF-8 (STR-742)."""
from __future__ import annotations
import io