From 0949a58da8919ffe851cb4e20add55f5b82c3d58 Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Mon, 1 Jun 2020 22:42:35 +0200 Subject: [PATCH] Fix flake8 warnings: mostly unused imports Fixes b4f51867b625b ("Fix crash when a localized email template is missing (#592)") Fixes 38aae77d33ac4 ("Improve error handling when sending emails") Fixes 77f50e9137bed ("Add new tests to check for email failures") --- ihatemoney/tests/tests.py | 1 - ihatemoney/web.py | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index e5ef9863..d8c9fbd2 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -14,7 +14,6 @@ import os import json from collections import defaultdict import six -import re import smtplib import socket from time import sleep diff --git a/ihatemoney/web.py b/ihatemoney/web.py index 312a4cb8..ad1f77bd 100644 --- a/ihatemoney/web.py +++ b/ihatemoney/web.py @@ -15,9 +15,8 @@ from flask import ( session, url_for, send_file, send_from_directory ) from flask_mail import Message -from flask_babel import get_locale, gettext as _ +from flask_babel import gettext as _ from werkzeug.security import check_password_hash, generate_password_hash -from smtplib import SMTPRecipientsRefused from werkzeug.exceptions import NotFound from sqlalchemy import orm from functools import wraps @@ -27,7 +26,10 @@ from ihatemoney.forms import ( AdminAuthenticationForm, AuthenticationForm, EditProjectForm, InviteForm, MemberForm, PasswordReminder, ResetPasswordForm, ProjectForm, get_billform_for ) -from ihatemoney.utils import Redirect303, list_of_dicts2json, list_of_dicts2csv, LoginThrottler, render_localized_template, send_email +from ihatemoney.utils import ( + Redirect303, list_of_dicts2json, list_of_dicts2csv, LoginThrottler, + render_localized_template, send_email +) main = Blueprint("main", __name__)