Closed last-partizan closed 2 years ago
…ction with async views from channels.
channels
here is the problem, _ResponseType is defined like this:
_ResponseType = Union[HttpResponseBase, Coroutine[Any, Any, HttpResponseBase]]
But async consumer from channels is returning None, it was Unknown in previous pyright releases, so it was working.
None
Unknown
Looking at the AsyncConsumer.__call__ signature, it is indeed does not return anything.
AsyncConsumer.__call__
Coroutine[Any, Any, HttpResponseBase] is expected to handle async django views?
Coroutine[Any, Any, HttpResponseBase]
And we need to add Coroutine[Any, Any, None] to support channels. Is this sounds right?
Coroutine[Any, Any, None]
Looks good, thank you!
…ction with async views from
channels
.here is the problem, _ResponseType is defined like this:
But async consumer from channels is returning
None
, it wasUnknown
in previous pyright releases, so it was working.Looking at the
AsyncConsumer.__call__
signature, it is indeed does not return anything.Coroutine[Any, Any, HttpResponseBase]
is expected to handle async django views?And we need to add
Coroutine[Any, Any, None]
to supportchannels
. Is this sounds right?