ASYNC002warningPro

blocking-in-async

Blocking calls in async functions defeat the purpose of async

Applies to: Go, JavaScript, Python, Rust, TypeScript

Why this matters

Async functions are meant to not block while waiting for I/O. If you use blocking calls like time.sleep() or requests.get() inside async code, you block the entire event loop and defeat the purpose of using async.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, ASYNC002 includedstablestack explain ASYNC002

ASYNC002 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: ASYNC002