style: drop docstrings from the header-value check

This commit is contained in:
Ahmed Allam 2026-10-03 22:07:49 +00:00 • committed by Ahmed Allam
parent 539960d953
commit 4ca15a6e60
2 changed files with 0 additions and 9 deletions

View file

@ -67,13 +67,6 @@ def _first_non_ascii(value: str) -> tuple[int, str] | None:
def check_header_safe_credentials(settings: Settings) -> None:
"""Reject credential settings that cannot travel as HTTP header values.
httpx encodes header values as ASCII, so a smart quote, non-breaking space
or byte-order mark pasted into an API key otherwise surfaces as a bare
``UnicodeEncodeError`` from inside the client. Name the setting and the
character instead; the value itself is neither printed nor rewritten.
"""
llm = settings.llm
candidates: list[tuple[str, str]] = []
if llm.api_key:

View file

@ -1,5 +1,3 @@
"""Preflight names a non-ASCII character in a credential instead of raising UnicodeEncodeError."""
from __future__ import annotations
import asyncio