From 75ae24a965ee212fa547ec6a99a23da87ce599e7 Mon Sep 17 00:00:00 2001 From: Tony Knapp <5892063+texastony@users.noreply.github.com> Date: Mon, 29 Aug 2022 19:00:24 -0700 Subject: [PATCH] chore: address linter concerns (#508) --- .../test/integration/test_i_decrypt_oracle.py | 1 + decrypt_oracle/tox.ini | 4 +-- src/aws_encryption_sdk/__init__.py | 6 ++-- tox.ini | 36 +++++++++---------- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/decrypt_oracle/test/integration/test_i_decrypt_oracle.py b/decrypt_oracle/test/integration/test_i_decrypt_oracle.py index 5863ecc0e..684633b32 100644 --- a/decrypt_oracle/test/integration/test_i_decrypt_oracle.py +++ b/decrypt_oracle/test/integration/test_i_decrypt_oracle.py @@ -25,6 +25,7 @@ def test_all_vectors(vector): decrypt_endpoint(), data=vector.ciphertext, headers={"Content-Type": "application/octet-stream", "Accept": "application/octet-stream"}, + timeout=120 # 2 minutes ) assert response.status_code == 200 assert response.content == vector.plaintext diff --git a/decrypt_oracle/tox.ini b/decrypt_oracle/tox.ini index 31ef18772..42cd6fd24 100644 --- a/decrypt_oracle/tox.ini +++ b/decrypt_oracle/tox.ini @@ -188,8 +188,8 @@ basepython = python3 deps = -rtest/requirements.txt {[testenv:generate-pipeline]deps} - pyflakes - pylint + pyflakes==2.5.0 + pylint==2.15.0 commands = pylint \ --rcfile=src/pylintrc \ diff --git a/src/aws_encryption_sdk/__init__.py b/src/aws_encryption_sdk/__init__.py index a846ba780..433aec5b3 100644 --- a/src/aws_encryption_sdk/__init__.py +++ b/src/aws_encryption_sdk/__init__.py @@ -37,9 +37,9 @@ ) warnings.warn( - 'This major version (1.x) of the AWS Encryption SDK for Python has reached End-of-Support.\n' + - 'It will no longer receive security updates or bug fixes.\n' + - 'Consider updating to the latest version of the AWS Encryption SDK.', + 'This major version (1.x) of the AWS Encryption SDK for Python has reached End-of-Support.\n' + + 'It will no longer receive security updates or bug fixes.\n' + + 'Consider updating to the latest version of the AWS Encryption SDK.', DeprecationWarning, ) diff --git a/tox.ini b/tox.ini index 7f406d793..f0c1568c5 100644 --- a/tox.ini +++ b/tox.ini @@ -132,7 +132,7 @@ commands = {[testenv:test-upstream-requirements-base]commands} # Linters [testenv:flake8] -basepython = python3 +basepython = python3.8 deps = -rdev_requirements/linter-requirements.txt commands = @@ -164,7 +164,7 @@ commands = examples/test/ [testenv:pylint] -basepython = python3 +basepython = {[testenv:flake8]basepython} deps = {[testenv]deps} -rdev_requirements/linter-requirements.txt @@ -192,7 +192,7 @@ commands = test/integration/ [testenv:blacken-src] -basepython = python3 +basepython = {[testenv:flake8]basepython} deps = -rdev_requirements/linter-requirements.txt commands = @@ -206,26 +206,26 @@ commands = [testenv:blacken] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = {[testenv:blacken-src]deps} commands = {[testenv:blacken-src]commands} [testenv:black-check] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = {[testenv:blacken]deps} commands = {[testenv:blacken-src]commands} --diff [testenv:isort-seed] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = -rdev_requirements/linter-requirements.txt commands = seed-isort-config [testenv:isort] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = -rdev_requirements/linter-requirements.txt commands = isort -rc \ src \ @@ -237,12 +237,12 @@ commands = isort -rc \ {posargs} [testenv:isort-check] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = {[testenv:isort]deps} commands = {[testenv:isort]commands} -c [testenv:autoformat] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = {[testenv:blacken]deps} {[testenv:isort]deps} @@ -251,30 +251,30 @@ commands = {[testenv:isort]commands} [testenv:doc8] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = -rdev_requirements/linter-requirements.txt commands = doc8 doc/index.rst README.rst CHANGELOG.rst [testenv:readme] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = -rdev_requirements/linter-requirements.txt commands = python setup.py check -r -s [testenv:bandit] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = -rdev_requirements/linter-requirements.txt commands = bandit -r src/aws_encryption_sdk/ # Prone to false positives: only run independently [testenv:vulture] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = -rdev_requirements/linter-requirements.txt commands = vulture src/aws_encryption_sdk/ [testenv:linters] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = {[testenv:flake8]deps} {[testenv:pylint]deps} @@ -289,7 +289,7 @@ commands = {[testenv:bandit]commands} [testenv:linters-tests] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = {[testenv:flake8-tests]deps} {[testenv:pylint-tests]deps} @@ -298,7 +298,7 @@ commands = {[testenv:pylint-tests]commands} [testenv:linters-examples] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = {[testenv:flake8-examples]deps} {[testenv:pylint-examples]deps} @@ -308,13 +308,13 @@ commands = # Documentation [testenv:docs] -basepython = python3 +basepython = {[testenv:pylint]basepython} deps = -rdoc/requirements.txt commands = sphinx-build -E -c doc/ -b html doc/ doc/build/html [testenv:serve-docs] -basepython = python3 +basepython = {[testenv:pylint]basepython} skip_install = true changedir = doc/build/html deps =