]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
authorpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Wed, 22 Oct 2025 13:00:27 +0000 (13:00 +0000)
committerpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Wed, 22 Oct 2025 13:00:29 +0000 (13:00 +0000)
docs_src/custom_response/tutorial009c.py
tests/test_default_response_class.py

index 337f0cd208bec299b6e6a70015dc1cb3a6b6b9d7..6ac4e2ab7332e95dc6f0f7d921a898b2bcfc135d 100644 (file)
@@ -10,6 +10,7 @@ class CustomORJSONResponse(Response):
 
     def render(self, content: Any) -> bytes:
         import orjson
+
         assert orjson is not None, "orjson must be installed"
         return orjson.dumps(content, option=orjson.OPT_INDENT_2)
 
index bd37e13e0f475a1851a5dc3aba62b00a0ed0c33a..821a713733a85e8b376d8f2fe2c4f2d10467ec0d 100644 (file)
@@ -1,7 +1,6 @@
 from typing import Any
 
 import pytest
-
 from fastapi import APIRouter, FastAPI
 from fastapi.responses import HTMLResponse, JSONResponse, PlainTextResponse
 from fastapi.testclient import TestClient
@@ -12,6 +11,7 @@ class ORJSONResponse(JSONResponse):
 
     def render(self, content: Any) -> bytes:
         import orjson
+
         return orjson.dumps(content)