[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-11-24 14:49:57 +00:00
parent 9b8df1e0e7
commit 488d737b6b
1 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ class HTTPCloudEvent:
headers: list
body: Any # unsure about typing here
def to_binary(event: CloudEvent) -> HTTPCloudEvent:
e = event.to_dict()
# logic to marshall into http binary output
@ -169,9 +169,9 @@ def from_binary(headers: list, body: dict, event_types: Optional[dict[str, type]
event_as_dict = {}
# specific logic to unmarshall raw headers into a dictionary
if event_types:
# Use
# Use
return event_types.get(event_as_dict['type'], CloudEvent).from_dict(e)
else:
else:
return CloudEvent.from_dict(e)
```