Use `inspect.isawaitable` instead of custom `is_awaitable` helper function
bartenra opened this issue · comments
bartenra commented
Since Python 3.5 there's an inspect.isawaitable
function.
I believe the is_awaitable
function in the code base should be removed. Instead, the function part of the standard library should be used.
I was having issues because I was using __getattr__
in a class and is_awaitable
helper uses hasattr(value, "__await__")
, resulting in a false positive.