Skip to content

Commit

Permalink
Ignore typing error
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Busetti <[email protected]>
  • Loading branch information
febus982 committed Sep 20, 2023
1 parent b38efed commit e73e3ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cloudevents/pydantic/v2/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ def _ce_json_dumps(self) -> typing.Dict[str, typing.Any]:
:return: Event serialized as a standard CloudEvent dict with user specific
parameters.
"""
return json.loads(conversion.to_json(self))
# Here mypy complains about json.loads returning Any
# which is incompatible with this method return type
# but we know it's always a dictionary in this case
return json.loads(conversion.to_json(self)) # type: ignore

def _get_attributes(self) -> typing.Dict[str, typing.Any]:
return {
Expand Down

0 comments on commit e73e3ab

Please sign in to comment.