Skip to content

chore: Fix CI #380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_decrypt-oracle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
# The oracle runs in a Python 3.6 Lamba
python-version: 3.6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- isort-check
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: 3.8
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_test-vector-handler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
aws-secret-access-key: ${{ secrets.INTEG_AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
architecture: x86
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}
Expand Down
4 changes: 2 additions & 2 deletions codebuild/py35/awses_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ phases:
python: latest
build:
commands:
- pyenv install 3.5.9
- pyenv local 3.5.9
- pyenv install 3.5.10
- pyenv local 3.5.10
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 2 additions & 2 deletions codebuild/py35/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.5.9
- pyenv local 3.5.9
- pyenv install 3.5.10
- pyenv local 3.5.10
- pip install tox tox-pyenv
- tox
4 changes: 2 additions & 2 deletions codebuild/py35/integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.5.9
- pyenv local 3.5.9
- pyenv install 3.5.10
- pyenv local 3.5.10
- pip install tox tox-pyenv
- tox
4 changes: 3 additions & 1 deletion codebuild/py36/awses_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ phases:
python: latest
build:
commands:
- pip install tox
- pyenv install 3.6.15
- pyenv local 3.6.15
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 3 additions & 1 deletion codebuild/py36/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ phases:
python: latest
build:
commands:
- pip install tox
- pyenv install 3.6.15
- pyenv local 3.6.15
- pip install tox tox-pyenv
- tox
4 changes: 3 additions & 1 deletion codebuild/py36/integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ phases:
python: latest
build:
commands:
- pip install tox
- pyenv install 3.6.15
- pyenv local 3.6.15
- pip install tox tox-pyenv
- tox
4 changes: 2 additions & 2 deletions codebuild/py37/awses_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ phases:
python: latest
build:
commands:
- pyenv install 3.7.9
- pyenv local 3.7.9
- pyenv install 3.7.12
- pyenv local 3.7.12
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 2 additions & 2 deletions codebuild/py37/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.7.9
- pyenv local 3.7.9
- pyenv install 3.7.12
- pyenv local 3.7.12
- pip install tox tox-pyenv
- tox
4 changes: 2 additions & 2 deletions codebuild/py37/integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.7.9
- pyenv local 3.7.9
- pyenv install 3.7.12
- pyenv local 3.7.12
- pip install tox tox-pyenv
- tox
4 changes: 3 additions & 1 deletion codebuild/py38/awses_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ phases:
python: latest
build:
commands:
- pip install tox
- pyenv install 3.8.12
- pyenv local 3.8.12
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 3 additions & 1 deletion codebuild/py38/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ phases:
python: latest
build:
commands:
- pip install tox
- pyenv install 3.8.12
- pyenv local 3.8.12
- pip install tox tox-pyenv
- tox
4 changes: 3 additions & 1 deletion codebuild/py38/integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ phases:
python: latest
build:
commands:
- pip install tox
- pyenv install 3.8.12
- pyenv local 3.8.12
- pip install tox tox-pyenv
- tox
4 changes: 2 additions & 2 deletions codebuild/py39/awses_1.7.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ phases:
python: latest
build:
commands:
- pyenv install 3.9.0
- pyenv local 3.9.0
- pyenv install 3.9.7
- pyenv local 3.9.7
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 2 additions & 2 deletions codebuild/py39/awses_2.0.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ phases:
python: latest
build:
commands:
- pyenv install 3.9.0
- pyenv local 3.9.0
- pyenv install 3.9.7
- pyenv local 3.9.7
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 2 additions & 2 deletions codebuild/py39/awses_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ phases:
python: latest
build:
commands:
- pyenv install 3.9.0
- pyenv local 3.9.0
- pyenv install 3.9.7
- pyenv local 3.9.7
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 2 additions & 2 deletions codebuild/py39/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.9.0
- pyenv local 3.9.0
- pyenv install 3.9.7
- pyenv local 3.9.7
- pip install tox tox-pyenv
- tox
4 changes: 2 additions & 2 deletions codebuild/py39/integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.9.0
- pyenv local 3.9.0
- pyenv install 3.9.7
- pyenv local 3.9.7
- pip install tox tox-pyenv
- tox
2 changes: 1 addition & 1 deletion decrypt_oracle/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def read(*args):
"""Read complete file contents."""
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with, unspecified-encoding


def get_version():
Expand Down
1 change: 1 addition & 0 deletions decrypt_oracle/src/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
disable =
bad-continuation, # we let black handle this
ungrouped-imports, # we let isort handle this
consider-using-f-string

[FORMAT]
max-line-length = 120
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_vectors_filename() -> Text:
def all_test_vectors() -> Iterable[Any]:
"""Collect and iterate through all test vectors."""

with open(test_vectors_filename(), "r") as vectors_file:
with open(test_vectors_filename(), "r") as vectors_file: # pylint: disable=unspecified-encoding
raw_vectors = json.load(vectors_file)

for vector in raw_vectors:
Expand Down
1 change: 1 addition & 0 deletions decrypt_oracle/test/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ disable =
missing-docstring, # we don't write docstrings for tests
bad-continuation, # we let black handle this
ungrouped-imports, # we let isort handle this
consider-using-f-string

[FORMAT]
max-line-length = 120
Expand Down
2 changes: 1 addition & 1 deletion examples/src/one_kms_cmk_streaming_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def encrypt_decrypt_stream(key_arn, source_plaintext_filename, botocore_session=
:param botocore_session: existing botocore session instance
:type botocore_session: botocore.session.Session
"""
kwargs = dict()
kwargs = {}

kwargs["key_ids"] = [key_arn]

Expand Down
1 change: 1 addition & 0 deletions examples/src/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ disable =
attribute-defined-outside-init, # breaks with attrs_post_init
abstract-method, # throws false positives on io.BaseIO grandchildren
redefined-outer-name, # we do this on purpose in multiple places
consider-using-f-string

[BASIC]
# Allow function names up to 50 characters
Expand Down
1 change: 1 addition & 0 deletions examples/test/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ disable =
# unknown modules as non-standard-library. flake8 tests for this as well
# and does treat them properly
duplicate-code, # tests for similar things tend to be similar
consider-using-f-string

[VARIABLES]
additional-builtins = raw_input
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def read(*args):
"""Reads complete file contents."""
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with, unspecified-encoding


def get_version():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def deserialize_header(stream, max_encrypted_data_keys=None):
tee_stream = TeeStream(stream, tee)
(version_id,) = unpack_values(">B", tee_stream)
version = _verified_version_from_id(version_id)
header = dict()
header = {}
header["version"] = version

if version == SerializationVersion.V1:
Expand Down
1 change: 1 addition & 0 deletions src/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ disable =
useless-object-inheritance,
raise-missing-from,
super-with-arguments,
consider-using-f-string

[BASIC]
# Allow function names up to 50 characters
Expand Down
3 changes: 3 additions & 0 deletions test/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ disable =
abstract-method, # we do this on purpose to test that they are enforced
redefined-outer-name, # raised when using decorators
unused-argument, # raised when patches are needed but not called
unspecified-encoding, # we use open() in binary mode which doesn't support encoding
# All below are disabled because we need to support Python 2
useless-object-inheritance,
raise-missing-from,
super-with-arguments,
consider-using-f-string,
redundant-u-string-prefix,

[VARIABLES]
additional-builtins = raw_input
Expand Down
10 changes: 5 additions & 5 deletions test/unit/test_encryption_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_client_encrypt(mocker):
commitment_policy=CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT, max_encrypted_data_keys=3
)

kwargs = dict()
kwargs = {}
kwargs["source"] = b"plaintext"
kwargs["materials_manager"] = cmm
client.encrypt(**kwargs)
Expand All @@ -77,7 +77,7 @@ def test_client_decrypt(mocker):
commitment_policy=CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT, max_encrypted_data_keys=3
)

kwargs = dict()
kwargs = {}
kwargs["source"] = b"ciphertext"
kwargs["materials_manager"] = cmm
client.decrypt(**kwargs)
Expand All @@ -94,7 +94,7 @@ def test_client_stream_encrypt(mocker, mode_string):
cmm = MagicMock(__class__=CryptoMaterialsManager)
client = aws_encryption_sdk.EncryptionSDKClient(commitment_policy=CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)

kwargs = dict()
kwargs = {}
kwargs["mode"] = mode_string
kwargs["source"] = b"plaintext"
kwargs["materials_manager"] = cmm
Expand All @@ -113,7 +113,7 @@ def test_client_stream_decrypt(mocker, mode_string):
cmm = MagicMock(__class__=CryptoMaterialsManager)
client = aws_encryption_sdk.EncryptionSDKClient(commitment_policy=CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)

kwargs = dict()
kwargs = {}
kwargs["mode"] = mode_string
kwargs["source"] = b"ciphertext"
kwargs["materials_manager"] = cmm
Expand All @@ -132,7 +132,7 @@ def test_client_bad_kwargs(mocker, method, key):
mocker.patch.object(aws_encryption_sdk, "StreamEncryptor")

cmm = MagicMock(__class__=CryptoMaterialsManager)
kwargs = dict()
kwargs = {}
kwargs[key] = "foobar"
kwargs["source"] = b"ciphertext"
kwargs["materials_manager"] = cmm
Expand Down
2 changes: 1 addition & 1 deletion test_vector_handlers/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def read(*args):
"""Read complete file contents."""
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with, unspecified-encoding


def get_version():
Expand Down
1 change: 1 addition & 0 deletions test_vector_handlers/src/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ disable =
useless-object-inheritance,
raise-missing-from,
super-with-arguments,
consider-using-f-string

[FORMAT]
max-line-length = 120
Expand Down
1 change: 1 addition & 0 deletions test_vector_handlers/test/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ disable =
useless-object-inheritance,
raise-missing-from,
super-with-arguments,
consider-using-f-string

[FORMAT]
max-line-length = 120
Expand Down