Skip to content

Commit

Permalink
changes:
Browse files Browse the repository at this point in the history
fix typings
  • Loading branch information
devkral committed Dec 19, 2024
1 parent f169466 commit 40eb5d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion esmerald/responses/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def __init__(
)
self.cookies = cookies or []

def make_response(self, content: Any) -> bytes | memoryview:
def make_response(self, content: Any) -> bytes | memoryview | str:
if (
content is None
or content is NoReturn
Expand Down
10 changes: 3 additions & 7 deletions esmerald/responses/mixins.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
from functools import partial
from typing import (
Any,
)
from typing import Any

import orjson
from lilya.responses import (
RESPONSE_TRANSFORM_KWARGS,
)
from lilya.responses import RESPONSE_TRANSFORM_KWARGS


class ORJSONTransformMixin:
Expand All @@ -31,4 +27,4 @@ def transform(cls, value: Any) -> Any:
transform_kwargs.setdefault("post_transform_fn", orjson.loads)

with cls.with_transform_kwargs(transform_kwargs):
return super().transform(value)
return super().transform(value) # type: ignore

0 comments on commit 40eb5d8

Please sign in to comment.