Description
The process_partial_response and async_process_partial_response functions have incomplete type annotations for the event parameter. Currently it's typed as dict, but since Lambda events are JSON objects, it should be typed as dict[str, Any] for better type checking.
Impact
When using strict type checkers like pyright, the current implementation causes type errors:
error: Type of "process_partial_response" is partially unknown
Type of "process_partial_response" is "(event: dict[Unknown, Unknown], ...)" (reportUnknownVariableType)
With dict[str, Any], the type checker correctly infers the event type.
Additional Context
- AWS Lambda events are always JSON objects, which in Python are represented as
dict[str, Any]
- This change improves type safety without breaking existing code
- The same pattern is used elsewhere in the codebase for Lambda event parameters
Description
The
process_partial_responseandasync_process_partial_responsefunctions have incomplete type annotations for theeventparameter. Currently it's typed asdict, but since Lambda events are JSON objects, it should be typed asdict[str, Any]for better type checking.Impact
When using strict type checkers like
pyright, the current implementation causes type errors:With
dict[str, Any], the type checker correctly infers the event type.Additional Context
dict[str, Any]