From 62290dce81b067f7987a770f2e7760fc734c461f Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 21:00:00 +0000 Subject: [PATCH] refactor(schemas): type _pydantic_field_default's model param as type[BaseModel] _pydantic_field_default annotated its model parameter as type[Any], even though every call site (cli.py, runner.py, mcp_server.py, overlay.py) passes a pydantic model class (VerifyVisualClaimsInput or ViewportConfig), and the function reads model.model_fields, a BaseModel classvar. Tightened to type[BaseModel], continuing the same Any-to-concrete-type vein already applied repeatedly elsewhere in this repo (navigator_client.py, runner.py, mcp_server.py, actions.py, overlay.py). The return type stays Any since a field's declared default can genuinely be any type. Co-authored-by: Claude --- src/frontend_visualqa/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend_visualqa/schemas.py b/src/frontend_visualqa/schemas.py index 8532fb4..4e08e41 100644 --- a/src/frontend_visualqa/schemas.py +++ b/src/frontend_visualqa/schemas.py @@ -35,7 +35,7 @@ def validate_url(url: str) -> str: return url -def _pydantic_field_default(model: type[Any], field_name: str) -> Any: +def _pydantic_field_default(model: type[BaseModel], field_name: str) -> Any: """Return a pydantic model field's declared default. Centralizes what was previously a CLI-only helper so the MCP tool