mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-01 01:18:34 +00:00
* fix(router): make the constructor stub work for mypy and guard it in CI Use a plain ParamSpec so mypy reads the stub, drop the dead _host parameter the Rust core already refused, type check a valid and an unknown argument in tests/e2e_harness, and run that type check when litellm Python files change. * fix(typing): read type variables as type variables in mypy and guard the Router stub in lint * fix(typing): count only the probe errors in the Router stub guard and flag Final type variables everywhere * fix(lint): run the Router stub guard and e2e type check from make check make check now runs check_router_constructor_stub.py when litellm/router.py or uv.lock changes, and the e2e basedpyright step on pyproject.toml, uv.lock, pyrightconfig.json, and litellm-proxy-extras Python, matching CI. CI's e2e type check also fires on litellm-proxy-extras Python, which tests/e2e/perf imports. LIT010 treats TypeAliasType like a type variable, since mypy also rejects a Final type alias. * fix(lint): guard the Router stub through the litellm export and keep TypeAliasType bare in LIT010 docs * test: type the new LIT010 type variable tests |
||
|---|---|---|
| .. | ||
| pre_call_checks | ||
| router_callbacks | ||
| client_initalization_utils.py | ||
| cooldown_cache.py | ||
| cooldown_callbacks.py | ||
| cooldown_handlers.py | ||
| deployment_numbers.py | ||
| dynamic_queue.py | ||
| dynamic_queue_redis.py | ||
| dynamic_queue_router.py | ||
| embedding_batch_size_check.py | ||
| endpoint_eligibility.py | ||
| fallback_event_handlers.py | ||
| global_callback_holders.py | ||
| handle_error.py | ||
| health_state_cache.py | ||
| kubernetes_pod_discovery.py | ||
| model_group_pricing.py | ||
| prompt_caching_cache.py | ||
| request_priority.py | ||
| routing_prefetch.py | ||
| routing_read_batch.py | ||
| stream_usage_injection.py | ||