Fix typing for FastAPI add api route

Make typing of endpoint parameter consistent with downstream calls and
other utilities.
This commit is contained in:
ordinary-jamie 2023-09-13 07:28:22 +10:00
parent c6437d555d
commit c2f9db2c03
1 changed files with 1 additions and 1 deletions

View File

@ -294,7 +294,7 @@ class FastAPI(Starlette):
def add_api_route(
self,
path: str,
endpoint: Callable[..., Coroutine[Any, Any, Response]],
endpoint: Callable[..., Any],
*,
response_model: Any = Default(None),
status_code: Optional[int] = None,