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:
@@ -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()
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user