mirror of https://github.com/tiangolo/fastapi.git
🎨 Auto format
This commit is contained in:
parent
513e943f96
commit
c539578d19
|
|
@ -656,8 +656,8 @@ class APIRoute(routing.Route):
|
|||
)
|
||||
|
||||
@cached_property
|
||||
def response_fields(self) -> dict[int| str, ModelField]:
|
||||
response_fields: dict[int| str, ModelField] = {}
|
||||
def response_fields(self) -> dict[int | str, ModelField]:
|
||||
response_fields: dict[int | str, ModelField] = {}
|
||||
for additional_status_code, response in self.responses.items():
|
||||
assert isinstance(response, dict), "An additional response must be a dict"
|
||||
model = response.get("model")
|
||||
|
|
|
|||
|
|
@ -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…
Reference in New Issue