mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-24 16:23:44 -04: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,
|
Notification.notification_type == SMS_TYPE,
|
||||||
func.substr(Notification.normalised_to, 3, 7) == '7700900',
|
func.substr(Notification.normalised_to, 3, 7) == '7700900',
|
||||||
Service.restricted == False, # noqa
|
Service.restricted == False, # noqa
|
||||||
Service.research_mode == False,
|
Service.research_mode == False, # noqa
|
||||||
Service.active == True,
|
Service.active == True, # noqa
|
||||||
).group_by(
|
).group_by(
|
||||||
Notification.service_id,
|
Notification.service_id,
|
||||||
).having(
|
).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.key_type != KEY_TYPE_TEST,
|
||||||
Notification.notification_type == SMS_TYPE,
|
Notification.notification_type == SMS_TYPE,
|
||||||
Service.restricted == False, # noqa
|
Service.restricted == False, # noqa
|
||||||
Service.research_mode == False,
|
Service.research_mode == False, # noqa
|
||||||
Service.active == True,
|
Service.active == True, # noqa
|
||||||
).group_by(
|
).group_by(
|
||||||
Notification.service_id,
|
Notification.service_id,
|
||||||
).having(
|
).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.notification_type == SMS_TYPE,
|
||||||
Notification.status == NOTIFICATION_PERMANENT_FAILURE,
|
Notification.status == NOTIFICATION_PERMANENT_FAILURE,
|
||||||
Service.restricted == False, # noqa
|
Service.restricted == False, # noqa
|
||||||
Service.research_mode == False,
|
Service.research_mode == False, # noqa
|
||||||
Service.active == True,
|
Service.active == True, # noqa
|
||||||
).group_by(
|
).group_by(
|
||||||
Notification.service_id,
|
Notification.service_id,
|
||||||
subquery.c.total_count
|
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.notification_type == LETTER_TYPE,
|
||||||
Notification.api_key_id == None, # noqa
|
Notification.api_key_id == None, # noqa
|
||||||
Notification.status != NOTIFICATION_CANCELLED,
|
Notification.status != NOTIFICATION_CANCELLED,
|
||||||
Template.hidden == True,
|
Template.hidden == True, # noqa
|
||||||
Notification.created_at >= today - func.coalesce(ServiceDataRetention.days_of_retention, 7)
|
Notification.created_at >= today - func.coalesce(ServiceDataRetention.days_of_retention, 7)
|
||||||
]
|
]
|
||||||
if limit_days is not None:
|
if limit_days is not None:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
flake8==3.8.4
|
flake8==4.0.1
|
||||||
flake8-bugbear==20.11.1
|
flake8-bugbear==20.11.1
|
||||||
isort==5.7.0
|
isort==5.7.0
|
||||||
moto==2.0.11
|
moto==2.0.11
|
||||||
|
|||||||
Reference in New Issue
Block a user