You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(testing): adopter type-checking test suite with zero-ignore contract (#634)
* feat(testing): adopter type-checking test suite with zero-ignore contract
Adds tests/type_checks/ — seven files that exercise documented SDK
extension patterns under mypy --strict with zero # type: ignore lines.
Bundled with the AccountStore.resolution ClassVar fix required to make
the patterns type-check cleanly.
Closes#625https://claude.ai/code/session_01NDYgk4r6ooU1Zj3qZwainB
* ci: wire adopter type-check suite into test matrix
Adds "Run adopter type-check suite" step to the test job so
mypy --strict tests/type_checks/ runs on every CI pass across all
four Python matrix versions.
https://claude.ai/code/session_01NDYgk4r6ooU1Zj3qZwainB
* fix(testing): address pre-PR review findings in type-check suite
- extend_response_with_override: replace Field on _-prefixed name
(Pydantic v2 NameError) with PrivateAttr
- handler_three_branch_return: add AsyncSeller covering the async
direct-return branch (all three SalesResult paths now present)
- pyproject.toml: re-enable import-not-found in tests.type_checks.*
override so broken imports fail rather than pass silently
https://claude.ai/code/session_01NDYgk4r6ooU1Zj3qZwainB
* fix(testing): update webhook type-check for typed McpWebhookPayload return
create_mcp_webhook_payload was changed in #632 to return McpWebhookPayload
(typed Pydantic model) instead of dict[str, Any]. The type-check test
still demonstrated the dict + cast() pattern, which no longer typechecks.
Update to demonstrate the new zero-ignore adopter pattern: typed
attribute access (payload.task_id) for reads, to_wire_dict(payload) for
HTTP serialization. Use TaskType.create_media_buy (a real async task
type — get_products is sync-only and not in the TaskType enum).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(testing): use GeneratedTaskStatus enum return type in webhook test
McpWebhookPayload.status is GeneratedTaskStatus (enum), not str.
extract_status return type and assertion updated accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments