diff --git a/app/main/forms.py b/app/main/forms.py index 2d94a31f1..b5299c0cb 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -160,7 +160,7 @@ def password(label='Password'): class SMSCode(StringField): validators = [ DataRequired(message='Can’t be empty'), - Regexp(regex='^\d+$', message='Numbers only'), + Regexp(regex=r'^\d+$', message='Numbers only'), Length(min=5, message='Not enough numbers'), Length(max=5, message='Too many numbers'), ] diff --git a/app/main/views/two_factor.py b/app/main/views/two_factor.py index 4daf6f1e6..aca8889da 100644 --- a/app/main/views/two_factor.py +++ b/app/main/views/two_factor.py @@ -41,7 +41,7 @@ def two_factor_email(token): current_app.config['DANGEROUS_SALT'], current_app.config['EMAIL_2FA_EXPIRY_SECONDS'] )) - except SignatureExpired as exc: + except SignatureExpired: # lets decode again, without the expiry, to get the user id out orig_data = json.loads(check_token( token, diff --git a/requirements-app.txt b/requirements-app.txt index 9b736c2de..7ed3d2850 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -14,15 +14,12 @@ pyexcel-xlsx==0.5.6 pyexcel-ods3==0.5.2 pytz==2018.7 gunicorn==19.7.1 # >19.8 stops eventlet workers after a timeout -whitenoise==4.1 #manages static assets +whitenoise==4.1.1 #manages static assets eventlet==0.24.1 notifications-python-client==5.2.0 # PaaS awscli-cwlogs>=1.4,<1.5 -awscli==1.15.82 -botocore<1.11.0 - # Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default itsdangerous==0.24 # pyup: <1.0.0 diff --git a/requirements.txt b/requirements.txt index 869d4ff86..78f8d1d2e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,15 +16,12 @@ pyexcel-xlsx==0.5.6 pyexcel-ods3==0.5.2 pytz==2018.7 gunicorn==19.7.1 # >19.8 stops eventlet workers after a timeout -whitenoise==4.1 #manages static assets +whitenoise==4.1.1 #manages static assets eventlet==0.24.1 notifications-python-client==5.2.0 # PaaS awscli-cwlogs>=1.4,<1.5 -awscli==1.15.82 -botocore<1.11.0 - # Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default itsdangerous==0.24 # pyup: <1.0.0 @@ -32,8 +29,10 @@ itsdangerous==0.24 # pyup: <1.0.0 git+https://github.com/alphagov/notifications-utils.git@30.6.0#egg=notifications-utils==30.6.0 ## The following requirements were added by pip freeze: +awscli==1.16.53 bleach==2.1.3 boto3==1.6.16 +botocore==1.12.43 certifi==2018.10.15 chardet==3.0.4 Click==7.0 @@ -64,7 +63,7 @@ PyJWT==1.6.4 PyPDF2==1.26.0 python-dateutil==2.7.5 python-json-logger==0.1.8 -PyYAML==3.13 +PyYAML==3.12 redis==2.10.6 requests==2.20.1 rsa==3.4.2 diff --git a/requirements_for_test.txt b/requirements_for_test.txt index c0745d9c4..3487f9e36 100644 --- a/requirements_for_test.txt +++ b/requirements_for_test.txt @@ -1,13 +1,13 @@ -r requirements.txt isort==4.3.4 -pytest==3.10.0 +pytest==3.10.1 pytest-env==0.6.2 pytest-mock==1.10.0 pytest-cov==2.6.0 -pytest-xdist==1.24.0 +pytest-xdist==1.24.1 coveralls==1.5.1 beautifulsoup4==4.6.3 freezegun==0.3.11 -flake8==3.5.0 +flake8==3.6.0 flake8-print==3.1.0 requests-mock==1.5.2 diff --git a/setup.cfg b/setup.cfg index e4b7097a7..c1a6b7bb4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,3 +9,7 @@ multi_line_output=3 known_third_party=notifications_utils,notifications_python_client known_first_party=app,tests include_trailing_comma=True + +[flake8] +# W504 line break after binary operator +extend_ignore=W504 diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index 9b6896887..bec38ce0f 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -1368,7 +1368,7 @@ def test_incorrect_letter_contact_block_input( ('11 chars', None), ('', 'Can’t be empty'), ('abcdefghijkhgkg', 'Enter 11 characters or fewer'), - (' ¯\_(ツ)_/¯ ', 'Use letters and numbers only'), + (r' ¯\_(ツ)_/¯ ', 'Use letters and numbers only'), ('blood.co.uk', None), ('00123', "Can't start with 00") ])