You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Types: KalshiClient.from_env(**kwargs: object) leaks Any-equivalent typing into a public constructor #266
On a mypy --strict SDK that ships py.typed, the from_env entry point silently accepts arbitrary kwargs with arbitrary types — typos like time_out=10 aren't caught, and IDE completions on KalshiClient.from_env(...) give no signature help. The required # type: ignore[arg-type] internally is the smell.
README and docs/* show callers passing transport=RecordingTransport(...), timeout=, max_retries=, config=, etc. through this surface.
Recommended fix
Either spell out the forwarded kwargs explicitly (key_id/private_key/auth/config/demo/base_url/timeout/max_retries/transport) or expose a typing.Unpack-style TypedDict (ClientInitKwargs) so callers and mypy both get the real signature. The # type: ignore[arg-type] then drops.
Activity