mirror of
https://github.com/usestrix/strix.git
synced 2026-10-04 02:33:47 +00:00
style: drop docstrings from the header-value check
This commit is contained in:
parent
539960d953
commit
4ca15a6e60
2 changed files with 0 additions and 9 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
"""Preflight names a non-ASCII character in a credential instead of raising UnicodeEncodeError."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue