Will It Vibe logoWill It Vibe?
PY-010Low severity-4 points

Equality comparison with None/True/False singleton

Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.

What it detects

None, True, and False are singletons; comparing to them with ==/!= works but is not idiomatic and can be fooled by a custom __eq__.

Why it matters

None, True, and False are singletons in Python, so comparing to them with == or != works today but is not the idiomatic or fully safe way to check: a custom object can override __eq__ to make x == None return something unexpected, including a truthy value, even when x is not actually None. Using is or is not for these three tells the reader you are checking identity, not a value some class might redefine, and it is also marginally faster since it skips the __eq__ machinery entirely.

How to fix it

Replace == None / != None with is None / is not None. Replace == True / == False with a direct truthiness check (if flag: / if not flag:), or is True / is False when you specifically need to distinguish True from any other truthy value.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Code Quality & Syntax checks