flake8 - misc flake8 errs.

* unused variables
* variables in loops overshadowing imports
* excepts with no defined exc type (tried to avoid `except Exception` too)
* history mapper is still too complex
* default variables should never be mutable
This commit is contained in:
Leo Hemsted
2017-11-28 13:49:14 +00:00
parent 28d5f9b87f
commit 28088428f1
6 changed files with 14 additions and 11 deletions

View File

@@ -7,7 +7,9 @@ from app.models import EMAIL_TYPE, KEY_TYPE_NORMAL
from app.notifications.process_notifications import persist_notification, send_notification_to_queue
def send_notification_to_service_users(service_id, template_id, personalisation={}, include_user_fields=[]):
def send_notification_to_service_users(service_id, template_id, personalisation=None, include_user_fields=None):
personalisation = personalisation or {}
include_user_fields = include_user_fields or []
template = dao_get_template_by_id(template_id)
service = dao_fetch_service_by_id(service_id)
active_users = dao_fetch_active_users_for_service(service.id)