Skip to content

Commit 606656e

Browse files
authored
Merge pull request #43 from mattsb42-aws/bandit-and-print
Fixing emergent issues identified and caused by static checker updates
2 parents be6adb4 + 35d670a commit 606656e

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ dist
1818
docs/build
1919
test/integration/test_values.conf
2020
.python-version
21+
.pytest_cache

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ matrix:
3434
env: TOXENV=py36-accept
3535
- python: 3.6
3636
env: TOXENV=py36-examples
37-
- python: 3.6
38-
env: TOXENV=bandit
37+
# disabling Bandit run in Travis pending resolution of https://bugs.launchpad.net/bandit/+bug/1749603
38+
# - python: 3.6
39+
# env: TOXENV=bandit
3940
- python: 3.6
4041
env: TOXENV=doc8
4142
- python: 3.6

examples/src/basic_encryption.py

-5
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
1313
"""Example showing basic encryption and decryption of a value already in memory."""
14-
from __future__ import print_function
15-
1614
import aws_encryption_sdk
1715

1816

@@ -35,7 +33,6 @@ def cycle_string(key_arn, source_plaintext, botocore_session=None):
3533
source=source_plaintext,
3634
key_provider=master_key_provider
3735
)
38-
print('Ciphertext: ', ciphertext)
3936

4037
# Decrypt the ciphertext
4138
cycled_plaintext, decrypted_header = aws_encryption_sdk.decrypt(
@@ -55,5 +52,3 @@ def cycle_string(key_arn, source_plaintext, botocore_session=None):
5552
pair in decrypted_header.encryption_context.items()
5653
for pair in encryptor_header.encryption_context.items()
5754
)
58-
59-
print('Decrypted: ', cycled_plaintext)

tox.ini

+7-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
envlist =
33
py{27,34,35,36}-{local,integ,accept,examples},
44
bandit, doc8, readme, docs,
5-
{flake8,pylint}{,-tests,-examples}
5+
{flake8,pylint}{,-tests,-examples},
6+
vulture
67

78
# Additional test environments:
89
# vulture :: Runs vulture. Prone to false-positives.
@@ -22,14 +23,15 @@ passenv =
2223
# Identifies AWS KMS key id to use in integration tests
2324
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID \
2425
# Pass through AWS credentials
25-
AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN
26+
AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN \
27+
# Pass through AWS profile name (useful for local testing)
28+
AWS_PROFILE
2629
sitepackages = False
2730
deps =
2831
mock
2932
pytest>=3.3.1
3033
pytest-cov
3134
pytest-mock
32-
coverage
3335
commands =
3436
local: pytest --cov aws_encryption_sdk -m local -l {posargs}
3537
integ: pytest --cov aws_encryption_sdk -m integ -l {posargs}
@@ -44,7 +46,8 @@ deps =
4446
flake8
4547
flake8-docstrings
4648
flake8-import-order
47-
flake8-print>=3.0.1
49+
# https://github.com/JBKahn/flake8-print/pull/30
50+
flake8-print>=3.1.0
4851
commands =
4952
flake8 src/aws_encryption_sdk/ setup.py
5053

0 commit comments

Comments
 (0)