Hi, there is a common usage of Value(False) | Value(True) in Django projects. Ruff does not provide any configuration to extend the FBT003 default whitelist. So my request would be 1) Ignore Value by default like #6711 2) settings to extend FBT003 whitelist.
from django.db.models import Case, Q, Value, When
...
qs.annotate(
is_foo_or_bar=Case(
When(Q(is_foo=True) | Q(is_bar=True)),
then=Value(True), # noqa: FBT003
),
default=Value(False), # noqa: FBT003
)
Hi, there is a common usage of
Value(False)|Value(True)in Django projects. Ruff does not provide any configuration to extend the FBT003 default whitelist. So my request would be 1) IgnoreValueby default like #6711 2) settings to extend FBT003 whitelist.