refactor(mypy): fix all type errors in core routing tables

Fix 163 mypy errors across 8 routing table files by addressing:
- union-attr errors from RoutedProtocol union type access
- arg-type mismatches between RoutableObjectWithProvider union and ProtectedResource protocol
- return-value incompatibilities between specific types and union types
- Action enum usage instead of string literals for access control
- Protocol signature updates for DistributionRegistry.get/get_cached methods
- Variable naming conflicts in nested loops (models.py)
- Override signature compatibility in benchmarks.py

Remove routing_tables/ exclusion from pyproject.toml.
This commit is contained in:
Ashwin Bharambe 2025-10-29 12:40:37 -07:00
parent b90c6a2c8b
commit 856b503226
10 changed files with 100 additions and 98 deletions

View file

@ -274,7 +274,6 @@ exclude = [
"^src/llama_stack/core/client\\.py$",
"^src/llama_stack/core/request_headers\\.py$",
"^src/llama_stack/core/routers/",
"^src/llama_stack/core/routing_tables/",
"^src/llama_stack/core/server/endpoints\\.py$",
"^src/llama_stack/core/server/server\\.py$",
"^src/llama_stack/core/stack\\.py$",