CV05 — Compare with NULL using IS NULL / IS NOT NULL
Group: Convention · Auto-fixable: yes
x = NULL and x <> NULL are never true — NULL comparisons via =/<> always
yield NULL. Use IS NULL / IS NOT NULL. Fixed automatically when NULL is on
the right-hand side.
Example
Section titled “Example”bad: WHERE deleted_at = NULLgood: WHERE deleted_at IS NULLConfigure
Section titled “Configure”Disable this rule in banshee.toml:
[lint]exclude = ["CV05"]Or silence one line with -- noqa: CV05. See Linting.