Skip to content

Commit

Permalink
fix: remove unused noop serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfonseca committed Nov 7, 2023
1 parent 4962246 commit ca62c39
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
9 changes: 0 additions & 9 deletions aws_lambda_powertools/shared/headers_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,3 @@ def serialize(self, headers: Dict[str, Union[str, List[str]]], cookies: List[Coo
payload["headers"][key] = values[-1]

return payload


class NoopSerializer(BaseHeadersSerializer):
"""
Noop serializer that doesn't do anything. This is useful for resolvers that don't need to set headers or cookies.
"""

def serialize(self, headers: Dict[str, Union[str, List[str]]], cookies: List[Cookie]) -> Dict[str, Any]:
return {}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import Dict, List, Optional

from aws_lambda_powertools.shared.headers_serializer import BaseHeadersSerializer, NoopSerializer
from aws_lambda_powertools.utilities.data_classes.common import BaseProxyEvent, DictWrapper


Expand Down Expand Up @@ -103,6 +102,3 @@ def prompt_session_attributes(self) -> Dict[str, str]:
@property
def path(self) -> str:
return self["apiPath"]

def header_serializer(self) -> BaseHeadersSerializer:
return NoopSerializer()

0 comments on commit ca62c39

Please sign in to comment.