Commit ec2f00b
committed
fix(typing): accept Mapping type in resolve() for event parameter
Change resolve() event parameter type hint from dict[str, Any] to
Mapping[str, Any] to allow Powertools event data classes (e.g.,
LambdaFunctionUrlEvent) to be passed without type errors.
Use cast(dict, event) for internal method calls that expect dict type
to satisfy mypy while maintaining zero runtime overhead.
This is backwards compatible since dict is a subtype of Mapping.
Closes #78641 parent 896c0ee commit ec2f00b
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2461 | 2461 | | |
2462 | 2462 | | |
2463 | 2463 | | |
2464 | | - | |
| 2464 | + | |
2465 | 2465 | | |
2466 | 2466 | | |
2467 | 2467 | | |
| |||
2514 | 2514 | | |
2515 | 2515 | | |
2516 | 2516 | | |
2517 | | - | |
| 2517 | + | |
2518 | 2518 | | |
2519 | 2519 | | |
2520 | | - | |
| 2520 | + | |
2521 | 2521 | | |
2522 | 2522 | | |
2523 | 2523 | | |
| |||
0 commit comments