Skip to content

Commit 9338567

Browse files
committed
chore: flake8 linting
1 parent 2fabdc7 commit 9338567

File tree

9 files changed

+22
-32
lines changed

9 files changed

+22
-32
lines changed

test/functional/delegated_keys/test_jce.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def build_short_key_cases():
7878
@pytest.mark.parametrize("algorithm, key_bits, too_short, error_message", build_short_key_cases())
7979
def test_warn_on_short_keys(caplog, algorithm, key_bits, too_short, error_message):
8080
with caplog.at_level(logging.DEBUG):
81-
_test = JceNameLocalDelegatedKey.generate(algorithm, key_bits)
81+
_test = JceNameLocalDelegatedKey.generate(algorithm, key_bits) # noqa=F401
8282

8383
logging_results = caplog.text
8484
assert (too_short and error_message in logging_results) or (not too_short and error_message not in logging_results)

test/functional/functional_test_utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,7 @@ def cycle_batch_item_check(
520520

521521

522522
def cycle_batch_writer_check(raw_table, encrypted_table, initial_actions, initial_item):
523-
"""Check that cycling (plaintext->encrypted->decrypted) items with the Table batch writer
524-
has the expected results.
525-
"""
523+
"""Cycling (plaintext->encrypted->decrypted) items with the Table batch writer should have the expected results."""
526524
check_attribute_actions = initial_actions.copy()
527525
check_attribute_actions.set_index_keys(*list(TEST_KEY.keys()))
528526
items = _generate_items(initial_item, _nop_transformer)
@@ -757,7 +755,7 @@ def client_cycle_batch_items_check_scan_paginator(
757755
scan the table with raw client paginator to get encrypted items,
758756
scan the table with encrypted client paginator to get decrypted items,
759757
then verify that all items appear to have been encrypted correctly.
760-
"""
758+
""" # noqa=D401
761759
kwargs = {}
762760
if region_name is not None:
763761
kwargs["region_name"] = region_name

test/functional/material_providers/store/test_meta.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,13 @@
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
1313
"""Functional tests for ``dynamodb_encryption_sdk.material_providers.store.meta``."""
14-
import base64
15-
import os
16-
17-
import boto3
1814
import pytest
19-
from moto import mock_dynamodb2
2015

2116
from dynamodb_encryption_sdk.exceptions import NoKnownVersionError
2217
from dynamodb_encryption_sdk.material_providers.store.meta import MetaStore, MetaStoreAttributeNames
2318
from dynamodb_encryption_sdk.material_providers.wrapped import WrappedCryptographicMaterialsProvider
2419

25-
from ...functional_test_utils import build_static_jce_cmp, mock_metastore
20+
from ...functional_test_utils import mock_metastore # noqa=F401 pylint: disable=unused-import
2621

2722
pytestmark = [pytest.mark.functional, pytest.mark.local]
2823

test/functional/material_providers/test_most_recent.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@
2121
from dynamodb_encryption_sdk.material_providers.most_recent import MostRecentProvider
2222
from dynamodb_encryption_sdk.material_providers.store import ProviderStore
2323

24-
from ..functional_test_utils import ( # pylint: disable=unused-import
25-
TEST_TABLE_NAME,
26-
check_metastore_cache_use_encrypt,
27-
example_table,
28-
mock_metastore,
29-
)
24+
from ..functional_test_utils import example_table # noqa=F401 pylint: disable=unused-import
25+
from ..functional_test_utils import mock_metastore # noqa=F401 pylint: disable=unused-import
26+
from ..functional_test_utils import TEST_TABLE_NAME, check_metastore_cache_use_encrypt
3027

3128
pytestmark = [pytest.mark.functional, pytest.mark.local]
3229

test/functional/test_structures.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@
1818
from dynamodb_encryption_sdk.identifiers import CryptoAction
1919
from dynamodb_encryption_sdk.structures import AttributeActions, TableIndex, TableInfo
2020

21-
from .functional_test_utils import (
22-
TEST_TABLE_NAME,
23-
example_table,
24-
table_with_global_secondary_indexes,
25-
table_with_local_secondary_indexes,
26-
)
21+
from .functional_test_utils import example_table # noqa=F401 pylint: disable=unused-import
22+
from .functional_test_utils import table_with_global_secondary_indexes # noqa=F401 pylint: disable=unused-import
23+
from .functional_test_utils import table_with_local_secondary_indexes # noqa=F401 pylint: disable=unused-import
24+
from .functional_test_utils import TEST_TABLE_NAME
2725

2826
pytestmark = [pytest.mark.functional, pytest.mark.local]
2927

test/integration/integration_test_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020

2121
# convenience imports
2222
try:
23-
from ..functional import functional_test_utils, hypothesis_strategies
23+
from ..functional import hypothesis_strategies # noqa=F401 pylint: disable=unused-import
24+
from ..functional import functional_test_utils
2425
except (ImportError, ValueError, SystemError):
2526
if "AWS_ENCRYPTION_SDK_EXAMPLES_TESTING" not in os.environ:
2627
raise

test/integration/material_providers/store/test_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from dynamodb_encryption_sdk.exceptions import NoKnownVersionError
1717
from dynamodb_encryption_sdk.material_providers.store.meta import MetaStore, MetaStoreAttributeNames
1818

19-
from ...integration_test_utils import temp_metastore # pylint: disable=unused-import
19+
from ...integration_test_utils import temp_metastore # noqa=F401 pylint: disable=unused-import
2020

2121
pytestmark = [pytest.mark.integ, pytest.mark.ddb_integ]
2222

test/integration/material_providers/test_most_recent.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313
"""Load testing using MostRecentProvider and MetaStore."""
1414
import pytest
1515

16-
from ..integration_test_utils import ( # pylint: disable=unused-import
17-
ddb_table_name,
18-
functional_test_utils,
19-
temp_metastore,
20-
)
16+
from ..integration_test_utils import ddb_table_name # noqa=F401 pylint: disable=unused-import
17+
from ..integration_test_utils import temp_metastore # noqa=F401 pylint: disable=unused-import
18+
from ..integration_test_utils import functional_test_utils
2119

2220
pytestmark = [pytest.mark.integ, pytest.mark.ddb_integ]
2321

test/unit/internal/formatting/test_attribute.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
13-
"""Unit tests for ``dynamodb_encryption_sdk.internal.formatting.serialize.attribute``
14-
and ``dynamodb_encryption_sdk.internal.formatting.deserialize.attribute``."""
13+
"""De/serialization unit tests.
14+
15+
Tests for ``dynamodb_encryption_sdk.internal.formatting.serialize.attribute``
16+
and ``dynamodb_encryption_sdk.internal.formatting.deserialize.attribute``.
17+
"""
1518
import pytest
1619

1720
from dynamodb_encryption_sdk.internal.formatting.serialize.attribute import _sorted_key_map

0 commit comments

Comments
 (0)