mirror of
https://github.com/django/django.git
synced 2025-08-08 12:58:37 +00:00
Replaced kwargs.pop() with keyword-only arguments.
This commit is contained in:
parent
2ba588e773
commit
1e87c9fe71
2 changed files with 5 additions and 7 deletions
|
@ -55,10 +55,8 @@ class Q(tree.Node):
|
|||
default = AND
|
||||
conditional = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
connector = kwargs.pop('_connector', None)
|
||||
negated = kwargs.pop('_negated', False)
|
||||
super().__init__(children=[*args, *sorted(kwargs.items())], connector=connector, negated=negated)
|
||||
def __init__(self, *args, _connector=None, _negated=False, **kwargs):
|
||||
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