mirror of
https://github.com/django/django.git
synced 2025-08-07 12:28:18 +00:00
Refs #28909 -- Simplifed code using unpacking generalizations.
This commit is contained in:
parent
4fc8fb7dda
commit
8ef8bc0f64
33 changed files with 84 additions and 97 deletions
|
@ -58,7 +58,7 @@ class Q(tree.Node):
|
|||
def __init__(self, *args, **kwargs):
|
||||
connector = kwargs.pop('_connector', None)
|
||||
negated = kwargs.pop('_negated', False)
|
||||
super().__init__(children=list(args) + sorted(kwargs.items()), connector=connector, negated=negated)
|
||||
super().__init__(children=[*args, *sorted(kwargs.items())], connector=connector, negated=negated)
|
||||
|
||||
def _combine(self, other, conn):
|
||||
if not isinstance(other, Q):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue