Add idiomatic documentation to Go, Java, Python, and Rust clients
This commit is contained in:
@@ -23,6 +23,7 @@ class ClientOptions:
|
||||
stream_timeout: float | None = None
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
"""Validate options; raise `ValueError` for invalid combinations."""
|
||||
if not self.endpoint:
|
||||
raise ValueError("endpoint must not be empty")
|
||||
|
||||
@@ -34,6 +35,7 @@ class ClientOptions:
|
||||
raise ValueError("stream_timeout must be greater than zero")
|
||||
|
||||
def __repr__(self) -> str:
|
||||
"""Return a repr that redacts the API key value."""
|
||||
api_key = REDACTED if self.api_key else None
|
||||
return (
|
||||
f"{type(self).__name__}(endpoint={self.endpoint!r}, "
|
||||
|
||||
Reference in New Issue
Block a user