fix: correct mypy type: ignore error codes (attr-defined)

This commit is contained in:
Navnit Shukla 2026-06-08 14:41:53 -07:00
parent f9de88f930
commit 9f9cac25f2
No known key found for this signature in database
GPG key ID: 46D87897A91C215F

View file

@ -188,7 +188,7 @@ class SnowflakeCortexAnthropicConfig(SnowflakeBaseConfig):
content_blocks: List[Dict[str, Any]] = []
if content:
content_blocks.append({"type": "text", "text": content})
for tc in tool_calls: # type: ignore[union-attr]
for tc in tool_calls: # type: ignore[attr-defined]
func = (
tc.get("function", {})
if isinstance(tc, dict)
@ -385,7 +385,7 @@ class SnowflakeCortexAnthropicConfig(SnowflakeBaseConfig):
)
model_response.choices = [choice]
model_response.usage = usage # type: ignore[assignment]
model_response.usage = usage # type: ignore[attr-defined]
model_response.model = "snowflake/" + response_json.get("model", model)
model_response.id = response_json.get("id", "")