Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small cleanup leveraging lilya 0.11.9 #461

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions esmerald/responses/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,7 @@ def make_response(self, content: Any) -> bytes | memoryview | str:
return b'""'
# keep it a serialized json object
transform_kwargs.setdefault("post_transform_fn", None)
else:
# strip '"'
transform_kwargs.setdefault("post_transform_fn", lambda x: x.strip(b'"'))
# otherwise use default logic of lilya striping '"'
with self.with_transform_kwargs(transform_kwargs):
# if content is bytes it won't be transformed and
# if None or NoReturn, return b"", this differs from the dedicated JSONResponses.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies = [
"email-validator >=2.2.0,<3.0.0",
"itsdangerous>=2.1.2,<3.0.0",
"jinja2>=3.1.2,<4.0.0",
"lilya>=0.11.8",
"lilya>=0.11.9",
"loguru>=0.7.0,<0.8.0",
"pydantic>=2.10,<3.0.0",
"pydantic-settings>=2.0.0,<3.0.0",
Expand Down
Loading