Browse Source

🎨 Auto format

pull/10589/head
pre-commit-ci-lite[bot] 5 months ago
committed by GitHub
parent
commit
c539578d19
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      tests/test_route_deferred_init.py

5
tests/test_route_deferred_init.py

@ -1,5 +1,4 @@
from itertools import chain
from typing import Optional
from fastapi import APIRouter, Depends, FastAPI
from fastapi.routing import APIRoute
@ -26,9 +25,7 @@ def check_if_initialized(route: APIRoute, should_not: bool = False):
assert key in route.__dict__
def create_test_router(
routes: Optional[list[BaseRoute]] = None, defer_init: bool = True
):
def create_test_router(routes: list[BaseRoute] | None = None, defer_init: bool = True):
router = APIRouter(routes=routes or [], defer_init=defer_init)
class UserIdBody(BaseModel):

Loading…
Cancel
Save