mirror of https://github.com/tiangolo/fastapi.git
fix mypy
This commit is contained in:
parent
219138c252
commit
3d56ad5080
Binary file not shown.
|
|
@ -120,10 +120,10 @@ def _merge_lifespan_context(
|
|||
async def merged_lifespan(app: AppType) -> AsyncIterator[Mapping[str, Any]]:
|
||||
async with original_context(app) as maybe_self_context:
|
||||
async with nested_context(app) as maybe_nested_context:
|
||||
context = maybe_self_context or {}
|
||||
if maybe_nested_context:
|
||||
context.update(maybe_nested_context)
|
||||
yield context
|
||||
yield {
|
||||
**(maybe_self_context or {}),
|
||||
**(maybe_nested_context or {})
|
||||
}
|
||||
|
||||
return merged_lifespan
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue