QUAL013warningPro

mixed-boolean-operators

Mixed and/or without parentheses makes operator precedence ambiguous

Applies to: Go, JavaScript, Python, TypeScript

Why this matters

`and`/`&&` binds tighter than `or`/`||`. Without explicit parentheses, `a or b and c` means `a or (b and c)` — not `(a or b) and c`. Adding parens prevents subtle logic bugs.

Catch it before it ships

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

QUAL013 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: QUAL013