mirror of https://github.com/tiangolo/fastapi.git
🚨 Fix black linting (#682)
This commit is contained in:
parent
65536cbf63
commit
8609beb9ab
|
|
@ -428,9 +428,13 @@ async def solve_dependencies(
|
|||
dependency_overrides_provider=dependency_overrides_provider,
|
||||
dependency_cache=dependency_cache,
|
||||
)
|
||||
sub_values, sub_errors, background_tasks, sub_response, sub_dependency_cache = (
|
||||
solved_result
|
||||
)
|
||||
(
|
||||
sub_values,
|
||||
sub_errors,
|
||||
background_tasks,
|
||||
sub_response,
|
||||
sub_dependency_cache,
|
||||
) = solved_result
|
||||
sub_response = cast(Response, sub_response)
|
||||
response.headers.raw.extend(sub_response.headers.raw)
|
||||
if sub_response.status_code:
|
||||
|
|
@ -476,7 +480,10 @@ async def solve_dependencies(
|
|||
values.update(cookie_values)
|
||||
errors += path_errors + query_errors + header_errors + cookie_errors
|
||||
if dependant.body_params:
|
||||
body_values, body_errors = await request_body_to_args( # body_params checked above
|
||||
(
|
||||
body_values,
|
||||
body_errors,
|
||||
) = await request_body_to_args( # body_params checked above
|
||||
required_params=dependant.body_params, received_body=body
|
||||
)
|
||||
values.update(body_values)
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ def get_openapi_security_definitions(flat_dependant: Dependant) -> Tuple[Dict, L
|
|||
|
||||
|
||||
def get_openapi_operation_parameters(
|
||||
all_route_params: Sequence[Field]
|
||||
all_route_params: Sequence[Field],
|
||||
) -> List[Dict[str, Any]]:
|
||||
parameters = []
|
||||
for param in all_route_params:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ security = HTTPBase(scheme="Other", auto_error=False)
|
|||
|
||||
@app.get("/users/me")
|
||||
def read_current_user(
|
||||
credentials: Optional[HTTPAuthorizationCredentials] = Security(security)
|
||||
credentials: Optional[HTTPAuthorizationCredentials] = Security(security),
|
||||
):
|
||||
if credentials is None:
|
||||
return {"msg": "Create an account first"}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ security = HTTPBearer(auto_error=False)
|
|||
|
||||
@app.get("/users/me")
|
||||
def read_current_user(
|
||||
credentials: Optional[HTTPAuthorizationCredentials] = Security(security)
|
||||
credentials: Optional[HTTPAuthorizationCredentials] = Security(security),
|
||||
):
|
||||
if credentials is None:
|
||||
return {"msg": "Create an account first"}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ security = HTTPDigest(auto_error=False)
|
|||
|
||||
@app.get("/users/me")
|
||||
def read_current_user(
|
||||
credentials: Optional[HTTPAuthorizationCredentials] = Security(security)
|
||||
credentials: Optional[HTTPAuthorizationCredentials] = Security(security),
|
||||
):
|
||||
if credentials is None:
|
||||
return {"msg": "Create an account first"}
|
||||
|
|
|
|||
Loading…
Reference in New Issue