Fix flake8 issues

This commit is contained in:
Christopher Broderick 2023-10-10 14:08:47 +01:00
parent 276af1c03c
commit 104a849d9f
2 changed files with 4 additions and 4 deletions

View File

@ -186,11 +186,11 @@ def format_time_spent(time_spent):
def convert_value(value): def convert_value(value):
""" Convert date/time data type to known fixed format string """ """ Convert date/time data type to known fixed format string """
if type(value) == datetime: if type(value) is datetime:
return value.strftime(CUSTOMFIELD_DATETIME_FORMAT) return value.strftime(CUSTOMFIELD_DATETIME_FORMAT)
elif type(value) == date: elif type(value) is date:
return value.strftime(CUSTOMFIELD_DATE_FORMAT) return value.strftime(CUSTOMFIELD_DATE_FORMAT)
elif type(value) == time: elif type(value) is time:
return value.strftime(CUSTOMFIELD_TIME_FORMAT) return value.strftime(CUSTOMFIELD_TIME_FORMAT)
else: else:
return value return value

View File

@ -97,7 +97,7 @@ def send_templated_mail(template_name,
if isinstance(recipients, str): if isinstance(recipients, str):
if recipients.find(','): if recipients.find(','):
recipients = recipients.split(',') recipients = recipients.split(',')
elif type(recipients) != list: elif type(recipients) is not list:
recipients = [recipients] recipients = [recipients]
msg = EmailMultiAlternatives(subject_part, text_part, msg = EmailMultiAlternatives(subject_part, text_part,