summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-11-28 06:34:29 -0800
committerCarlton Gibson <carlton.gibson@noumenal.es>2019-11-28 15:34:29 +0100
commit86a0231e0a087d4b909f76223cc55d5bbb673930 (patch)
tree7ec943d2f4d9c936fffcc0412d39d26122a8d9a0 /django/forms
parent46a0edc3ba6c40d685b9d128c5f6d8723f9659ca (diff)
Refs #23919 -- Replaced super(...) with super() in metaclasses.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/forms.py2
-rw-r--r--django/forms/models.py2
-rw-r--r--django/forms/widgets.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py
index 48b237611f..a601467e18 100644
--- a/django/forms/forms.py
+++ b/django/forms/forms.py
@@ -30,7 +30,7 @@ class DeclarativeFieldsMetaclass(MediaDefiningClass):
attrs.pop(key)
attrs['declared_fields'] = dict(current_fields)
- new_class = super(DeclarativeFieldsMetaclass, mcs).__new__(mcs, name, bases, attrs)
+ new_class = super().__new__(mcs, name, bases, attrs)
# Walk through the MRO.
declared_fields = {}
diff --git a/django/forms/models.py b/django/forms/models.py
index 8b8be56b3b..d72c62f7f0 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -214,7 +214,7 @@ class ModelFormMetaclass(DeclarativeFieldsMetaclass):
formfield_callback = attrs.pop('formfield_callback', base_formfield_callback)
- new_class = super(ModelFormMetaclass, mcs).__new__(mcs, name, bases, attrs)
+ new_class = super().__new__(mcs, name, bases, attrs)
if bases == (BaseModelForm,):
return new_class
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index b1d885b2a3..6fe220bea7 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -183,7 +183,7 @@ class MediaDefiningClass(type):
Metaclass for classes that can have media definitions.
"""
def __new__(mcs, name, bases, attrs):
- new_class = super(MediaDefiningClass, mcs).__new__(mcs, name, bases, attrs)
+ new_class = super().__new__(mcs, name, bases, attrs)
if 'media' not in attrs:
new_class.media = media_property(new_class)