Refs #23919 -- Replaced stray super(ClassName, self) with super().
This commit is contained in:
parent
1a49b89470
commit
3eb3907bb1
|
@ -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)
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue