diff --git a/app/main/views/conversation.py b/app/main/views/conversation.py index 6e7fd257f..5125b6709 100644 --- a/app/main/views/conversation.py +++ b/app/main/views/conversation.py @@ -100,7 +100,7 @@ def get_user_number(service_id, notification_id): def get_sms_thread(service_id, user_number): - for notification in sorted(( + for notification in sorted(( # noqa: B020 notification_api_client.get_notifications_for_service(service_id, to=user_number, template_type='sms')['notifications'] + diff --git a/app/main/views/providers.py b/app/main/views/providers.py index cbdb581d7..d08128f7b 100644 --- a/app/main/views/providers.py +++ b/app/main/views/providers.py @@ -91,7 +91,7 @@ def edit_sms_provider_ratio(): def _get_versions_since_switchover(provider_id): - for version in sorted( + for version in sorted( # noqa: B020 provider_client.get_provider_versions(provider_id)['data'], key=lambda version: version['updated_at'] or '' ): @@ -109,7 +109,7 @@ def _chunk_versions_by_day(versions): days = defaultdict(list) - for version in sorted(versions, key=lambda version: version['updated_at'] or '', reverse=True): + for version in sorted(versions, key=lambda version: version['updated_at'] or '', reverse=True): # noqa: B020 days[ format_date_numeric(version['updated_at']) ].append(version) diff --git a/requirements_for_test.txt b/requirements_for_test.txt index ebc9f0e5c..6b37f9ee3 100644 --- a/requirements_for_test.txt +++ b/requirements_for_test.txt @@ -1,15 +1,15 @@ -r requirements.txt isort==5.10.1 -pytest==7.0.1 +pytest==7.1.1 pytest-env==0.6.2 pytest-mock==3.7.0 pytest-xdist==2.5.0 beautifulsoup4==4.10.0 -freezegun==1.1.0 +freezegun==1.2.0 flake8==4.0.1 -flake8-bugbear==22.1.11 +flake8-bugbear==22.3.23 flake8-print==4.0.0 -moto==3.0.5 +moto==3.1.4 requests-mock==1.9.3 # used for creating manifest file locally -jinja2-cli[yaml]==0.8.1 +jinja2-cli[yaml]==0.8.2 diff --git a/tests/app/main/views/test_templates.py b/tests/app/main/views/test_templates.py index f8b5c0c13..80ad278c1 100644 --- a/tests/app/main/views/test_templates.py +++ b/tests/app/main/views/test_templates.py @@ -1288,7 +1288,7 @@ def test_choose_a_template_to_copy( assert len(actual) == len(expected) - for actual, expected in zip(actual, expected): + for actual, expected in zip(actual, expected): # noqa: B020 assert normalize_spaces(actual.text) == expected links = page.select('main nav a') @@ -1354,7 +1354,7 @@ def test_choose_a_template_to_copy_when_user_has_one_service( assert len(actual) == len(expected) - for actual, expected in zip(actual, expected): + for actual, expected in zip(actual, expected): # noqa: B020 assert normalize_spaces(actual.text) == expected assert page.select('main nav a')[0]['href'] == url_for( @@ -1437,7 +1437,7 @@ def test_choose_a_template_to_copy_from_folder_within_service( assert len(actual) == len(expected) - for actual, expected in zip(actual, expected): + for actual, expected in zip(actual, expected): # noqa: B020 assert normalize_spaces(actual.text) == expected links = page.select('main nav a')