Skip to content

Commit

Permalink
馃帹 [pre-commit.ci] Auto format from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jul 31, 2022
1 parent 8fbc964 commit 2973bfd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fastapi/routing.py
Expand Up @@ -349,9 +349,13 @@ def __init__(
self.endpoint = endpoint
# self.response_model = response_model
if type(endpoint) != functools.partial:
self.response_model = response_model or endpoint.__annotations__.get("return")
self.response_model = response_model or endpoint.__annotations__.get(
"return"
)
else:
self.response_model = response_model or endpoint.func.__annotations__.get("return")
self.response_model = response_model or endpoint.func.__annotations__.get(
"return"
)
self.summary = summary
self.response_description = response_description
self.deprecated = deprecated
Expand Down

0 comments on commit 2973bfd

Please sign in to comment.