Skip to content

Commit c6699e1

Browse files
chore: Fix CI (#379)
1 parent 5a3b921 commit c6699e1

38 files changed

+67
-45
lines changed

.github/workflows/ci_decrypt-oracle.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v2
15-
- uses: actions/setup-python@v1
15+
- uses: actions/setup-python@v2
1616
with:
1717
# The oracle runs in a Python 3.6 Lamba
1818
python-version: 3.6

.github/workflows/ci_static-analysis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- isort-check
2929
steps:
3030
- uses: actions/checkout@v2
31-
- uses: actions/setup-python@v1
31+
- uses: actions/setup-python@v2
3232
with:
3333
python-version: 3.8
3434
- run: |

.github/workflows/ci_test-vector-handler.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
aws-secret-access-key: ${{ secrets.INTEG_AWS_SECRET_ACCESS_KEY }}
4848
aws-region: us-west-2
4949
- uses: actions/checkout@v2
50-
- uses: actions/setup-python@v1
50+
- uses: actions/setup-python@v2
5151
with:
5252
python-version: ${{ matrix.python }}
5353
architecture: ${{ matrix.architecture }}

.github/workflows/ci_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
architecture: x86
5050
steps:
5151
- uses: actions/checkout@v2
52-
- uses: actions/setup-python@v1
52+
- uses: actions/setup-python@v2
5353
with:
5454
python-version: ${{ matrix.python }}
5555
architecture: ${{ matrix.architecture }}

codebuild/py35/awses_local.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ phases:
1616
python: latest
1717
build:
1818
commands:
19-
- pyenv install 3.5.9
20-
- pyenv local 3.5.9
19+
- pyenv install 3.5.10
20+
- pyenv local 3.5.10
2121
- pip install tox tox-pyenv
2222
- cd test_vector_handlers
2323
- tox

codebuild/py35/examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ phases:
1414
python: latest
1515
build:
1616
commands:
17-
- pyenv install 3.5.9
18-
- pyenv local 3.5.9
17+
- pyenv install 3.5.10
18+
- pyenv local 3.5.10
1919
- pip install tox tox-pyenv
2020
- tox

codebuild/py35/integ.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ phases:
1414
python: latest
1515
build:
1616
commands:
17-
- pyenv install 3.5.9
18-
- pyenv local 3.5.9
17+
- pyenv install 3.5.10
18+
- pyenv local 3.5.10
1919
- pip install tox tox-pyenv
2020
- tox

codebuild/py36/awses_local.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ phases:
1616
python: latest
1717
build:
1818
commands:
19-
- pip install tox
19+
- pyenv install 3.6.15
20+
- pyenv local 3.6.15
21+
- pip install tox tox-pyenv
2022
- cd test_vector_handlers
2123
- tox

codebuild/py36/examples.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ phases:
1414
python: latest
1515
build:
1616
commands:
17-
- pip install tox
17+
- pyenv install 3.6.15
18+
- pyenv local 3.6.15
19+
- pip install tox tox-pyenv
1820
- tox

codebuild/py36/integ.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ phases:
1414
python: latest
1515
build:
1616
commands:
17-
- pip install tox
17+
- pyenv install 3.6.15
18+
- pyenv local 3.6.15
19+
- pip install tox tox-pyenv
1820
- tox

codebuild/py37/awses_local.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ phases:
1616
python: latest
1717
build:
1818
commands:
19-
- pyenv install 3.7.9
20-
- pyenv local 3.7.9
19+
- pyenv install 3.7.12
20+
- pyenv local 3.7.12
2121
- pip install tox tox-pyenv
2222
- cd test_vector_handlers
2323
- tox

codebuild/py37/examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ phases:
1414
python: latest
1515
build:
1616
commands:
17-
- pyenv install 3.7.9
18-
- pyenv local 3.7.9
17+
- pyenv install 3.7.12
18+
- pyenv local 3.7.12
1919
- pip install tox tox-pyenv
2020
- tox

codebuild/py37/integ.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ phases:
1414
python: latest
1515
build:
1616
commands:
17-
- pyenv install 3.7.9
18-
- pyenv local 3.7.9
17+
- pyenv install 3.7.12
18+
- pyenv local 3.7.12
1919
- pip install tox tox-pyenv
2020
- tox

codebuild/py38/awses_local.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ phases:
1616
python: latest
1717
build:
1818
commands:
19-
- pip install tox
19+
- pyenv install 3.8.12
20+
- pyenv local 3.8.12
21+
- pip install tox tox-pyenv
2022
- cd test_vector_handlers
2123
- tox

codebuild/py38/examples.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ phases:
1414
python: latest
1515
build:
1616
commands:
17-
- pip install tox
17+
- pyenv install 3.8.12
18+
- pyenv local 3.8.12
19+
- pip install tox tox-pyenv
1820
- tox

codebuild/py38/integ.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ phases:
1414
python: latest
1515
build:
1616
commands:
17-
- pip install tox
17+
- pyenv install 3.8.12
18+
- pyenv local 3.8.12
19+
- pip install tox tox-pyenv
1820
- tox

codebuild/py39/awses_1.7.1.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ phases:
1616
python: latest
1717
build:
1818
commands:
19-
- pyenv install 3.9.0
20-
- pyenv local 3.9.0
19+
- pyenv install 3.9.7
20+
- pyenv local 3.9.7
2121
- pip install tox tox-pyenv
2222
- cd test_vector_handlers
2323
- tox

codebuild/py39/awses_2.0.0.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ phases:
1616
python: latest
1717
build:
1818
commands:
19-
- pyenv install 3.9.0
20-
- pyenv local 3.9.0
19+
- pyenv install 3.9.7
20+
- pyenv local 3.9.7
2121
- pip install tox tox-pyenv
2222
- cd test_vector_handlers
2323
- tox

codebuild/py39/awses_latest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ phases:
1616
python: latest
1717
build:
1818
commands:
19-
- pyenv install 3.9.0
20-
- pyenv local 3.9.0
19+
- pyenv install 3.9.7
20+
- pyenv local 3.9.7
2121
- pip install tox tox-pyenv
2222
- cd test_vector_handlers
2323
- tox

codebuild/py39/examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ phases:
1414
python: latest
1515
build:
1616
commands:
17-
- pyenv install 3.9.0
18-
- pyenv local 3.9.0
17+
- pyenv install 3.9.7
18+
- pyenv local 3.9.7
1919
- pip install tox tox-pyenv
2020
- tox

codebuild/py39/integ.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ phases:
1414
python: latest
1515
build:
1616
commands:
17-
- pyenv install 3.9.0
18-
- pyenv local 3.9.0
17+
- pyenv install 3.9.7
18+
- pyenv local 3.9.7
1919
- pip install tox tox-pyenv
2020
- tox

decrypt_oracle/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def read(*args):
1212
"""Read complete file contents."""
13-
return open(os.path.join(HERE, *args)).read()
13+
return open(os.path.join(HERE, *args)).read() # pylint: disable=unspecified-encoding
1414

1515

1616
def get_version():

decrypt_oracle/src/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
disable =
44
bad-continuation, # we let black handle this
55
ungrouped-imports, # we let isort handle this
6+
consider-using-f-string
67

78
[FORMAT]
89
max-line-length = 120

decrypt_oracle/test/integration/integration_test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_vectors_filename() -> Text:
100100
def all_test_vectors() -> Iterable[Any]:
101101
"""Collect and iterate through all test vectors."""
102102

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

106106
for vector in raw_vectors:

decrypt_oracle/test/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ disable =
55
missing-docstring, # we don't write docstrings for tests
66
bad-continuation, # we let black handle this
77
ungrouped-imports, # we let isort handle this
8+
consider-using-f-string
89

910
[FORMAT]
1011
max-line-length = 120

examples/src/one_kms_cmk_streaming_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def encrypt_decrypt_stream(key_arn, source_plaintext_filename, botocore_session=
2525
:param botocore_session: existing botocore session instance
2626
:type botocore_session: botocore.session.Session
2727
"""
28-
kwargs = dict()
28+
kwargs = {}
2929

3030
kwargs["key_ids"] = [key_arn]
3131

examples/src/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ disable =
1414
attribute-defined-outside-init, # breaks with attrs_post_init
1515
abstract-method, # throws false positives on io.BaseIO grandchildren
1616
redefined-outer-name, # we do this on purpose in multiple places
17+
consider-using-f-string
1718

1819
[BASIC]
1920
# Allow function names up to 50 characters

examples/test/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ disable =
77
# unknown modules as non-standard-library. flake8 tests for this as well
88
# and does treat them properly
99
duplicate-code, # tests for similar things tend to be similar
10+
consider-using-f-string
1011

1112
[VARIABLES]
1213
additional-builtins = raw_input

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def read(*args):
1212
"""Reads complete file contents."""
13-
return open(os.path.join(HERE, *args)).read()
13+
return open(os.path.join(HERE, *args)).read() # pylint: disable=unspecified-encoding
1414

1515

1616
def get_version():

src/aws_encryption_sdk/internal/formatting/deserialize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def deserialize_header(stream, max_encrypted_data_keys=None):
344344
tee_stream = TeeStream(stream, tee)
345345
(version_id,) = unpack_values(">B", tee_stream)
346346
version = _verified_version_from_id(version_id)
347-
header = dict()
347+
header = {}
348348
header["version"] = version
349349

350350
if version == SerializationVersion.V1:

src/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ disable =
1414
useless-object-inheritance,
1515
raise-missing-from,
1616
super-with-arguments,
17+
consider-using-f-string
1718

1819
[BASIC]
1920
# Allow function names up to 50 characters

test/integration/test_kat_commitment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _file_root():
5050
base_dir = os.path.join(root_dir, "test", "resources")
5151
file_path = os.path.join(base_dir, FILE_NAME)
5252

53-
test_str = open(file_path, "r").read()
53+
test_str = open(file_path, "r").read() # pylint: disable=consider-using-with
5454
test_json = json.loads(test_str)
5555
kat_tests = test_json["tests"]
5656

test/pylintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ disable =
1818
abstract-method, # we do this on purpose to test that they are enforced
1919
redefined-outer-name, # raised when using decorators
2020
unused-argument, # raised when patches are needed but not called
21+
unspecified-encoding, # we use open() in binary mode which doesn't support encoding
2122
# All below are disabled because we need to support Python 2
2223
useless-object-inheritance,
2324
raise-missing-from,
2425
super-with-arguments,
26+
consider-using-f-string,
27+
redundant-u-string-prefix,
2528

2629
[VARIABLES]
2730
additional-builtins = raw_input

test/unit/test_crypto_data_keys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from mock import MagicMock, sentinel
1616
from pytest_mock import mocker # noqa pylint: disable=unused-import
1717

18-
import aws_encryption_sdk.internal.crypto.data_keys as data_keys
18+
from aws_encryption_sdk.internal.crypto import data_keys
1919

2020
pytestmark = [pytest.mark.unit, pytest.mark.local]
2121

test/unit/test_encryption_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_client_encrypt(mocker):
6565
max_encrypted_data_keys=3,
6666
)
6767

68-
kwargs = dict()
68+
kwargs = {}
6969
kwargs["source"] = b"plaintext"
7070
kwargs["materials_manager"] = cmm
7171
client.encrypt(**kwargs)
@@ -84,7 +84,7 @@ def test_client_decrypt(mocker):
8484
max_encrypted_data_keys=3,
8585
)
8686

87-
kwargs = dict()
87+
kwargs = {}
8888
kwargs["source"] = b"ciphertext"
8989
kwargs["materials_manager"] = cmm
9090
client.decrypt(**kwargs)
@@ -101,7 +101,7 @@ def test_client_stream_encrypt(mocker, mode_string):
101101
cmm = MagicMock(__class__=CryptoMaterialsManager)
102102
client = aws_encryption_sdk.EncryptionSDKClient(commitment_policy=CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
103103

104-
kwargs = dict()
104+
kwargs = {}
105105
kwargs["mode"] = mode_string
106106
kwargs["source"] = b"plaintext"
107107
kwargs["materials_manager"] = cmm
@@ -120,7 +120,7 @@ def test_client_stream_decrypt(mocker, mode_string):
120120
cmm = MagicMock(__class__=CryptoMaterialsManager)
121121
client = aws_encryption_sdk.EncryptionSDKClient(commitment_policy=CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
122122

123-
kwargs = dict()
123+
kwargs = {}
124124
kwargs["mode"] = mode_string
125125
kwargs["source"] = b"ciphertext"
126126
kwargs["materials_manager"] = cmm
@@ -139,7 +139,7 @@ def test_client_bad_kwargs(mocker, method, key):
139139
mocker.patch.object(aws_encryption_sdk, "StreamEncryptor")
140140

141141
cmm = MagicMock(__class__=CryptoMaterialsManager)
142-
kwargs = dict()
142+
kwargs = {}
143143
kwargs[key] = "foobar"
144144
kwargs["source"] = b"ciphertext"
145145
kwargs["materials_manager"] = cmm

test_vector_handlers/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def read(*args):
1212
"""Read complete file contents."""
13-
return open(os.path.join(HERE, *args)).read()
13+
return open(os.path.join(HERE, *args)).read() # pylint: disable=unspecified-encoding
1414

1515

1616
def get_version():

test_vector_handlers/src/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ disable =
88
useless-object-inheritance,
99
raise-missing-from,
1010
super-with-arguments,
11+
consider-using-f-string
1112

1213
[FORMAT]
1314
max-line-length = 120

test_vector_handlers/test/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ disable =
1111
useless-object-inheritance,
1212
raise-missing-from,
1313
super-with-arguments,
14+
consider-using-f-string
1415

1516
[FORMAT]
1617
max-line-length = 120

0 commit comments

Comments
 (0)