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
error: Argument "headers" to "Response" has incompatible type "dict[str, str]"; expected
"dict[str, str | list[str]] | None" [arg-type]
headers=headers,
^~~~~~~
note: "Dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
note: Consider using "Mapping" instead, which is covariant in the value type
Static type checker used
mypy (project's standard)
AWS Lambda function runtime
3.12
Powertools for AWS Lambda (Python) version
latest
Static type checker info
Code snippet
Possible Solution
Instead of
Dict[str, Union[str, List[str]]
useMapping[str, Union[str, List[str]]
.E.g. https://stackoverflow.com/a/73603324/6621062
The text was updated successfully, but these errors were encountered: