From 488d737b6b855c1473aac77076fb8cfe3f7f3e97 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 24 Nov 2023 14:49:57 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- v2-roadmap.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v2-roadmap.md b/v2-roadmap.md index 43434a3..488ede6 100644 --- a/v2-roadmap.md +++ b/v2-roadmap.md @@ -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) ```