-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
configurationRelated to settings and configurationRelated to settings and configurationruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
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
)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
configurationRelated to settings and configurationRelated to settings and configurationruleImplementing or modifying a lint ruleImplementing or modifying a lint rule