Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use inspect.isawaitable instead of custom is_awaitable helper function #163

Closed
bartenra opened this issue Mar 22, 2022 · 1 comment
Closed

Comments

@bartenra
Copy link

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.

@bartenra
Copy link
Author

OK I just found this thread: #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant