Open
Description
Feature
async def func() -> bool:
return True
async def func2() -> None:
if func():
print("hi")
In this code, a likely fix is to change func()
to await func()
. Meanwhile, it'll always be true since a Coroutine
is always true. The truthy-bool
check could flag it but it's not enabled by default. We can add a new truthy-coroutine
check (like truthy-function
) for the specific case of using a Coroutine
in boolean context.
The error message can suggest that an await
might've been mistakenly omitted.