forked from orbit-oss/flask
Correct the error handler typing
It may also be awaitable, as invocations are wrapped in ensure_sync.
This commit is contained in:
parent
cc80a47f5b
commit
80cf589a26
1 changed files with 4 additions and 1 deletions
|
|
@ -77,7 +77,10 @@ URLValuePreprocessorCallable = t.Callable[[t.Optional[str], t.Optional[dict]], N
|
|||
# https://github.com/pallets/flask/issues/4095
|
||||
# https://github.com/pallets/flask/issues/4295
|
||||
# https://github.com/pallets/flask/issues/4297
|
||||
ErrorHandlerCallable = t.Callable[[t.Any], ResponseReturnValue]
|
||||
ErrorHandlerCallable = t.Union[
|
||||
t.Callable[[t.Any], ResponseReturnValue],
|
||||
t.Callable[[t.Any], t.Awaitable[ResponseReturnValue]],
|
||||
]
|
||||
|
||||
RouteCallable = t.Union[
|
||||
t.Callable[..., ResponseReturnValue],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue