-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
With mypy (1.18.2) the error below is generated:
add_exception_handler(
app,
logger=logger,
post_hooks=[StripExtrasPostHook(exclude_status_codes=[500], enabled=True)],
unhandled_wrappers={
"404": NotFoundError,
"405": NotAllowedError,
"422": ValidationError,
"default": ServerExceptionError,
},
)
error: List item 0 has incompatible type "StripExtrasPostHook"; expected "Callable[[dict[Any, Any], Request, Response], tuple[dict[Any, Any], Response]]" [list-item]
note: "StripExtrasPostHook.__call__" has type "Callable[[Arg(dict[Any, Any], 'content'), Arg(Request, '_request'), Arg(JSONResponse, 'response')], tuple[dict[Any, Any], JSONResponse]]"
Metadata
Metadata
Assignees
Labels
No labels