try to make pylint happy
All checks were successful
buildbot/tox Build done.

This commit is contained in:
2022-06-08 00:08:09 +02:00
parent 8610e2a557
commit 98a6fc3ce7
60 changed files with 565 additions and 560 deletions

View File

@@ -9,8 +9,8 @@ app_config = apps.get_containing_app_config(__package__)
logger = logging.getLogger(__name__)
class AbstractMail(object):
_subject = u''
class AbstractMail: # pylint: disable=too-few-public-methods
_subject = ''
_template_name = None
def _get_sender(self):
@@ -20,7 +20,7 @@ class AbstractMail(object):
if subject_fmt is None:
subject_fmt = self._subject
if app_config.settings.email_subject_prefix:
subject_fmt = u'%s %s' % (app_config.settings.email_subject_prefix, subject_fmt)
subject_fmt = '%s %s' % (app_config.settings.email_subject_prefix, subject_fmt)
subject = subject_fmt.format(**kwargs)
return subject
@@ -57,7 +57,7 @@ class AbstractMail(object):
email = EmailMessage(subject=subject, body=body, from_email=sender, to=recipients, reply_to=reply_to)
if fail_silently:
logger.info(u'Fake sending %s to %s', self.__class__.__name__, recipients)
logger.info('Fake sending %s to %s', self.__class__.__name__, recipients)
else:
logger.info(u'Send %s to %s', self.__class__.__name__, recipients)
logger.info('Send %s to %s', self.__class__.__name__, recipients)
email.send(fail_silently=fail_silently)