Skip to content

Commit d1751e0

Browse files
committed
format
1 parent 25c38d0 commit d1751e0

6 files changed

Lines changed: 11 additions & 6 deletions

File tree

Chapter01/platform-home/test_main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from fastapi.testclient import TestClient
2-
32
from main import app
43

54

Chapter02/parents-portal/app/home.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Lang(StrEnum):
3232
async def home(
3333
request: Request,
3434
lang: Lang,
35-
name: str = Query(default=""), # noqa: FAST002
35+
name: str = Query(default=""), # noqa: FAST002
3636
):
3737
request_cookie = request.cookies.get("TRACKING")
3838
cookie_content = cookies_store.get(request_cookie, "Invalid")

Chapter03/reservation-service/presentation/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ async def measuring_request_performance(
6969
return response
7070

7171

72-
app.add_middleware(StateCheckMiddleware) # ty: ignore[invalid-argument-type] known issue with ty
72+
app.add_middleware(StateCheckMiddleware) # ty: ignore[invalid-argument-type] known issue with ty

Chapter05/api-gateway/tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ async def rate_limit_handler(
6767

6868
@app.get("/test")
6969
@limiter.limit("2/minute")
70-
async def test_endpoint(request: Request, _response: Response):
70+
async def test_endpoint(
71+
request: Request, _response: Response
72+
):
7173
del request
7274
return {"message": "ok"}
7375

Chapter05/api-gateway/tests/test_aggregation_router.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ def client(mock_portal_client, populated_reservation_client):
7979
"""Create test client with mock clients using lifespan."""
8080

8181
@asynccontextmanager
82-
async def test_lifespan(_app: FastAPI) -> AsyncGenerator[dict]:
82+
async def test_lifespan(
83+
_app: FastAPI,
84+
) -> AsyncGenerator[dict]:
8385
yield {
8486
"portal_client": mock_portal_client,
8587
"reservation_client": populated_reservation_client,

Chapter05/api-gateway/tests/test_app_integration.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ def app_with_rate_limiter(
5454
"""Create app with mock clients and rate limiter."""
5555

5656
@asynccontextmanager
57-
async def test_lifespan(_app: FastAPI) -> AsyncGenerator[dict]:
57+
async def test_lifespan(
58+
_app: FastAPI,
59+
) -> AsyncGenerator[dict]:
5860
yield {
5961
"portal_client": mock_portal_client,
6062
"reservation_client": populated_reservation_client,

0 commit comments

Comments
 (0)