fix: resolve mypy errors in meta_reference agents

- Fix type annotations for Safety API message parameters
- Add Action enum usage in access control checks
- Correct method signatures to match API supertype
- Handle optional return types with proper None checks
- Remove meta_reference exclusions from mypy config
This commit is contained in:
Ashwin Bharambe 2025-10-29 11:03:10 -07:00
parent b90c6a2c8b
commit f0d365622a
5 changed files with 48 additions and 26 deletions

View file

@ -284,12 +284,6 @@ exclude = [
"^src/llama_stack/models/llama/llama3/interface\\.py$",
"^src/llama_stack/models/llama/llama3/tokenizer\\.py$",
"^src/llama_stack/models/llama/llama3/tool_utils\\.py$",
"^src/llama_stack/providers/inline/agents/meta_reference/agents\\.py$",
"^src/llama_stack/providers/inline/agents/meta_reference/agent_instance\\.py$",
"^src/llama_stack/providers/inline/agents/meta_reference/config\\.py$",
"^src/llama_stack/providers/inline/agents/meta_reference/persistence\\.py$",
"^src/llama_stack/providers/inline/agents/meta_reference/safety\\.py$",
"^src/llama_stack/providers/inline/agents/meta_reference/__init__\\.py$",
"^src/llama_stack/providers/inline/datasetio/localfs/",
"^src/llama_stack/providers/inline/eval/meta_reference/eval\\.py$",
"^src/llama_stack/providers/inline/inference/meta_reference/inference\\.py$",