Browse Source

🎨 Auto format

pull/14446/head
pre-commit-ci-lite[bot] 8 months ago
committed by GitHub
parent
commit
0a97de688f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 9
      fastapi/routing.py

9
fastapi/routing.py

@ -545,12 +545,9 @@ class APIRoute(routing.Route):
response_model = None response_model = None
else: else:
response_model = return_annotation response_model = return_annotation
if ( if response_model is None or (
response_model is None not lenient_issubclass(response_model, BaseModel)
or ( and not dataclasses.is_dataclass(response_model)
not lenient_issubclass(response_model, BaseModel)
and not dataclasses.is_dataclass(response_model)
)
): ):
inferred = infer_response_model_from_ast(endpoint) inferred = infer_response_model_from_ast(endpoint)
if inferred: if inferred:

Loading…
Cancel
Save