PY-87568 python: add inspection for coroutine in boolean context

GitOrigin-RevId: a4225a2a8f2959947486a0bf927ff8ac388c5ccb
This commit is contained in:
Morgan Bartholomew
2026-02-16 13:18:27 +00:00
committed by intellij-monorepo-bot
parent a7bdd3fb88
commit 8870cfef3f
12 changed files with 307 additions and 10 deletions
@@ -0,0 +1,7 @@
async def f() -> bool:
return True
async def main():
if <warning descr="Coroutine not awaited in boolean context"><caret>f()</warning>:
print("hi")
@@ -0,0 +1,7 @@
async def f() -> bool:
return True
async def main():
if await f():
print("hi")