1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #23919 -- Replaced super(ClassName, self) with super().

This commit is contained in:
chillaranand
2017-01-21 18:43:44 +05:30
committed by Tim Graham
parent dc165ec8e5
commit d6eaf7c018
339 changed files with 1221 additions and 1296 deletions

View File

@@ -11,7 +11,7 @@ class EmailBackend(BaseEmailBackend):
def __init__(self, *args, **kwargs):
self.stream = kwargs.pop('stream', sys.stdout)
self._lock = threading.RLock()
super(EmailBackend, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
def write_message(self, message):
msg = message.message()

View File

@@ -40,7 +40,7 @@ class EmailBackend(ConsoleEmailBackend):
# Since we're using the console-based backend as a base,
# force the stream to be None, so we don't default to stdout
kwargs['stream'] = None
super(EmailBackend, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
def write_message(self, message):
self.stream.write(message.message().as_bytes() + b'\n')

View File

@@ -15,7 +15,7 @@ class EmailBackend(BaseEmailBackend):
The dummy outbox is accessible through the outbox instance attribute.
"""
def __init__(self, *args, **kwargs):
super(EmailBackend, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
if not hasattr(mail, 'outbox'):
mail.outbox = []

View File

@@ -18,7 +18,7 @@ class EmailBackend(BaseEmailBackend):
use_tls=None, fail_silently=False, use_ssl=None, timeout=None,
ssl_keyfile=None, ssl_certfile=None,
**kwargs):
super(EmailBackend, self).__init__(fail_silently=fail_silently)
super().__init__(fail_silently=fail_silently)
self.host = host or settings.EMAIL_HOST
self.port = port or settings.EMAIL_PORT
self.username = settings.EMAIL_HOST_USER if username is None else username

View File

@@ -429,7 +429,7 @@ class EmailMultiAlternatives(EmailMessage):
bytestrings). The SafeMIMEText class will handle any necessary encoding
conversions.
"""
super(EmailMultiAlternatives, self).__init__(
super().__init__(
subject, body, from_email, to, bcc, connection, attachments,
headers, cc, reply_to,
)