You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Isn't quite right if you use request_type= and/or response_type= in App initializer.
The set_error_serializer implementation gets the subclasses at run time, but:
Argument of type "(request: Request, response: Response, error: HTTPError) -> None" cannot be assigned to parameter "serializer" of type "ErrorSerializer" in function "set_error_serializer"
Type "(request: Request, response: Response, error: HTTPError) -> None" is not assignable to type "ErrorSerializer"
Parameter 1: type "Request" is incompatible with type "Request"
"falcon.request.Request" is not assignable to "my.Request"
Parameter 2: type "Response" is incompatible with type "Response"
"falcon.response.Response" is not assignable to "my.Response"
Pylance[reportArgumentType](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportArgumentType)
falcon/falcon/app.py
Line 960 in 6d7a45b
falcon/falcon/_typing.py
Line 88 in 6d7a45b
Isn't quite right if you use
request_type=
and/orresponse_type=
inApp
initializer.The
set_error_serializer
implementation gets the subclasses at run time, but:I think an elegant solution would be to replace:
falcon/falcon/app.py
Lines 267 to 268 in 6d7a45b
With e.g.:
Then:
falcon/falcon/_typing.py
Line 88 in 6d7a45b
Becomes:
Thoughts?
The text was updated successfully, but these errors were encountered: