diff options
| author | Tom <tom@tomforb.es> | 2017-06-09 17:32:18 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-06-10 20:46:43 -0400 |
| commit | 3eb3907bb1b4d8e57331d4a8181b28971613b761 (patch) | |
| tree | 4444a83553228280e327f7928c45aadebb7ab09b | |
| parent | 1a49b8947033fd667310b1b996330a8e119fcbf9 (diff) | |
Refs #23919 -- Replaced stray super(ClassName, self) with super().
| -rw-r--r-- | django/contrib/gis/db/models/functions.py | 2 | ||||
| -rw-r--r-- | django/forms/models.py | 3 | ||||
| -rw-r--r-- | tests/model_forms/tests.py | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/django/contrib/gis/db/models/functions.py b/django/contrib/gis/db/models/functions.py index 93a5031bd5..85f704c1ef 100644 --- a/django/contrib/gis/db/models/functions.py +++ b/django/contrib/gis/db/models/functions.py @@ -101,7 +101,7 @@ class GeomOutputGeoFunc(GeoFunc): def __init__(self, *expressions, **extra): if 'output_field' not in extra: extra['output_field'] = GeometryField() - super(GeomOutputGeoFunc, self).__init__(*expressions, **extra) + super().__init__(*expressions, **extra) def resolve_expression(self, *args, **kwargs): res = super().resolve_expression(*args, **kwargs) diff --git a/django/forms/models.py b/django/forms/models.py index 3b5e1300e0..f4467d2ebb 100644 --- a/django/forms/models.py +++ b/django/forms/models.py @@ -1301,7 +1301,8 @@ class ModelMultipleChoiceField(ModelChoiceField): if (hasattr(value, '__iter__') and not isinstance(value, str) and not hasattr(value, '_meta')): - return [super(ModelMultipleChoiceField, self).prepare_value(v) for v in value] + prepare_value = super().prepare_value + return [prepare_value(v) for v in value] return super().prepare_value(value) def has_changed(self, initial, data): diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index e636d212d8..96f6d6985b 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -1666,7 +1666,7 @@ class ModelChoiceFieldTests(TestCase): category = forms.ModelChoiceField(queryset=None) def __init__(self, *args, **kwargs): - super(ModelChoiceForm, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.fields['category'].queryset = Category.objects.filter(slug__contains='test') form = ModelChoiceForm() |
