mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Update flake8 from 3.8.4 to 4.0.1
And adds `noqa` to some non-errors which are being flagged.
This commit is contained in:
@@ -544,8 +544,8 @@ def dao_find_services_sending_to_tv_numbers(start_date, end_date, threshold=500)
|
||||
Notification.notification_type == SMS_TYPE,
|
||||
func.substr(Notification.normalised_to, 3, 7) == '7700900',
|
||||
Service.restricted == False, # noqa
|
||||
Service.research_mode == False,
|
||||
Service.active == True,
|
||||
Service.research_mode == False, # noqa
|
||||
Service.active == True, # noqa
|
||||
).group_by(
|
||||
Notification.service_id,
|
||||
).having(
|
||||
@@ -564,8 +564,8 @@ def dao_find_services_with_high_failure_rates(start_date, end_date, threshold=10
|
||||
Notification.key_type != KEY_TYPE_TEST,
|
||||
Notification.notification_type == SMS_TYPE,
|
||||
Service.restricted == False, # noqa
|
||||
Service.research_mode == False,
|
||||
Service.active == True,
|
||||
Service.research_mode == False, # noqa
|
||||
Service.active == True, # noqa
|
||||
).group_by(
|
||||
Notification.service_id,
|
||||
).having(
|
||||
@@ -590,8 +590,8 @@ def dao_find_services_with_high_failure_rates(start_date, end_date, threshold=10
|
||||
Notification.notification_type == SMS_TYPE,
|
||||
Notification.status == NOTIFICATION_PERMANENT_FAILURE,
|
||||
Service.restricted == False, # noqa
|
||||
Service.research_mode == False,
|
||||
Service.active == True,
|
||||
Service.research_mode == False, # noqa
|
||||
Service.active == True, # noqa
|
||||
).group_by(
|
||||
Notification.service_id,
|
||||
subquery.c.total_count
|
||||
|
||||
@@ -84,7 +84,7 @@ def dao_get_uploads_by_service_id(service_id, limit_days=None, page=1, page_size
|
||||
Notification.notification_type == LETTER_TYPE,
|
||||
Notification.api_key_id == None, # noqa
|
||||
Notification.status != NOTIFICATION_CANCELLED,
|
||||
Template.hidden == True,
|
||||
Template.hidden == True, # noqa
|
||||
Notification.created_at >= today - func.coalesce(ServiceDataRetention.days_of_retention, 7)
|
||||
]
|
||||
if limit_days is not None:
|
||||
|
||||
Reference in New Issue
Block a user