Add checking for coroutine on async gen helper to await it instead of just returning.
before:
await (await self.client.search_async)
after:
await self.client.search_async
What problem is this fixing?
When using some async methods that simply returns the async transport (like search_async) we were having to manually call await twice (like below). It was happening because we were only awaiting things on the helper if they were a generator, but not if they were a coroutine.
Describe your change
Add checking for coroutine on async gen helper to await it instead of just returning.
before:
after:
What problem is this fixing?
When using some async methods that simply returns the async transport (like search_async) we were having to manually call await twice (like below). It was happening because we were only awaiting things on the helper if they were a generator, but not if they were a coroutine.