Skip to content

Commit

Permalink
chore: address linter concerns (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
texastony authored Aug 30, 2022
1 parent c2babf8 commit 75ae24a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 23 deletions.
1 change: 1 addition & 0 deletions decrypt_oracle/test/integration/test_i_decrypt_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions decrypt_oracle/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
6 changes: 3 additions & 3 deletions src/aws_encryption_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down
36 changes: 18 additions & 18 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -164,7 +164,7 @@ commands =
examples/test/

[testenv:pylint]
basepython = python3
basepython = {[testenv:flake8]basepython}
deps =
{[testenv]deps}
-rdev_requirements/linter-requirements.txt
Expand Down Expand Up @@ -192,7 +192,7 @@ commands =
test/integration/

[testenv:blacken-src]
basepython = python3
basepython = {[testenv:flake8]basepython}
deps =
-rdev_requirements/linter-requirements.txt
commands =
Expand All @@ -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 \
Expand All @@ -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}
Expand All @@ -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}
Expand All @@ -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}
Expand All @@ -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}
Expand All @@ -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 =
Expand Down

0 comments on commit 75ae24a

Please sign in to comment.