Skip to content

Commit bdccada

Browse files
bokelleyclaude
andcommitted
fix: add type annotations to AdCPBaseModel methods
Add proper type annotations to model_dump() and model_dump_json() to satisfy mypy strict type checking. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6f25a66 commit bdccada

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/adcp/types/base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
"""Base model for AdCP types with spec-compliant serialization."""
44

5+
from typing import Any
6+
57
from pydantic import BaseModel
68

79

@@ -13,12 +15,12 @@ class AdCPBaseModel(BaseModel):
1315
when not present (not sent as null).
1416
"""
1517

16-
def model_dump(self, **kwargs):
18+
def model_dump(self, **kwargs: Any) -> dict[str, Any]:
1719
if "exclude_none" not in kwargs:
1820
kwargs["exclude_none"] = True
1921
return super().model_dump(**kwargs)
2022

21-
def model_dump_json(self, **kwargs):
23+
def model_dump_json(self, **kwargs: Any) -> str:
2224
if "exclude_none" not in kwargs:
2325
kwargs["exclude_none"] = True
2426
return super().model_dump_json(**kwargs)

0 commit comments

Comments
 (0)