diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index 412bbfcad3..a551b46857 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -278,7 +278,7 @@ def get_typed_return_annotation(call: Callable[..., Any]) -> Any: globalns = getattr(call, "__globals__", {}) typed_annotation = get_typed_annotation(annotation, globalns) - if typed_annotation is type(None): # noqa: E721 + if typed_annotation is type(None): # noqa: E721 return None return typed_annotation