Skip to content

Commit

Permalink
Use dict() instead of {**x}
Browse files Browse the repository at this point in the history
  • Loading branch information
orf committed Jul 20, 2017
1 parent 6a62532 commit 842f8e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions django/db/models/aggregates.py
Expand Up @@ -84,7 +84,7 @@ def as_sql(self, compiler, connection, **extra_context):
def _get_repr_options(self):
parent_options = super()._get_repr_options()
if self.filter:
return {**parent_options, 'filter': self.filter}
return dict(parent_options, filter=self.filter)
return parent_options


Expand Down Expand Up @@ -127,7 +127,7 @@ def __init__(self, expression, distinct=False, filter=None, **extra):

def _get_repr_options(self):
parent_options = super()._get_repr_options()
return {**parent_options, 'distinct': self.extra['distinct'] != ''}
return dict(parent_options, distinct=self.extra['distinct'] != '')

def convert_value(self, value, expression, connection, context):
if value is None:
Expand All @@ -154,7 +154,7 @@ def __init__(self, expression, sample=False, **extra):

def _get_repr_options(self):
parent_options = super()._get_repr_options()
return {**parent_options, 'sample': self.function == 'STDDEV_SAMP'}
return dict(parent_options, sample=self.function == 'STDDEV_SAMP')

def convert_value(self, value, expression, connection, context):
if value is None:
Expand Down Expand Up @@ -185,7 +185,7 @@ def __init__(self, expression, sample=False, **extra):

def _get_repr_options(self):
parent_options = super()._get_repr_options()
return {**parent_options, 'sample': self.function == 'VAR_SAMP'}
return dict(parent_options, sample=self.function == 'VAR_SAMP')

def convert_value(self, value, expression, connection, context):
if value is None:
Expand Down

0 comments on commit 842f8e7

Please sign in to comment.