Class 'X' does not define '__await__` on coroutines
Answered
This has started happening recently, I'll define a coroutine and add a type hint for the return type but PyCharm doesn't seem to respect the fact that the function is a coroutine.
In this case, `is_global` is defined as `async def is_global(*args, **kwargs) -> bool:`

Please sign in to leave a comment.
Hi there,
Normally, we are able to properly infer the type "Coroutine[Any, Any, bool]" for such functions. Could you please show the full definition of "is_global()" including its docstring and what return type is shown for it, e.g. in Quick Documentation?
I have the same problem for all my 'async def...' functions.
Hi Pavel,
Could you please provide the requested above information?
Happens to me as well. Not sure, but it happens after I run Code|Inspect Code on another project.
Now every async function in my project shows an error.
The same code as above but in scratch doesn't show any errors.
Other projects are fine.
Along with that, I've got another weird error. Not sure are they connected or not.
@Alwxsin
Is it reproducible in a new test project?
If so, please file an issue to our tracker https://youtrack.jetbrains.com/issues/PY and provide it there along with steps for reproducing and idea.log file from Help | Show Log in...
Unfortunately, we had no luck in reproducing the issue with the given information.
The problem was in `typing` library.
There is an issue for that https://youtrack.jetbrains.com/issue/PY-37257