diff --git a/examples/src/aws_kms_encrypted_client.py b/examples/src/aws_kms_encrypted_client.py index 87af4f91..fcf4774d 100644 --- a/examples/src/aws_kms_encrypted_client.py +++ b/examples/src/aws_kms_encrypted_client.py @@ -124,7 +124,7 @@ def encrypt_batch_items(table_name, aws_cmk_id): def _select_index_from_item(item): """Find the index keys that match this item.""" for index in index_keys: - if all([item[key] == value for key, value in index.items()]): + if all(item[key] == value for key, value in index.items()): return index raise Exception("Index key not found in item.") @@ -132,7 +132,7 @@ def _select_index_from_item(item): def _select_item_from_index(index, all_items): """Find the item that matches these index keys.""" for item in all_items: - if all([item[key] == value for key, value in index.items()]): + if all(item[key] == value for key, value in index.items()): return item raise Exception("Index key not found in item.") diff --git a/examples/src/aws_kms_encrypted_resource.py b/examples/src/aws_kms_encrypted_resource.py index dabcf311..5a8d3907 100644 --- a/examples/src/aws_kms_encrypted_resource.py +++ b/examples/src/aws_kms_encrypted_resource.py @@ -76,7 +76,7 @@ def encrypt_batch_items(table_name, aws_cmk_id): def _select_index_from_item(item): """Find the index keys that match this item.""" for index in index_keys: - if all([item[key] == value for key, value in index.items()]): + if all(item[key] == value for key, value in index.items()): return index raise Exception("Index key not found in item.") @@ -84,7 +84,7 @@ def _select_index_from_item(item): def _select_item_from_index(index, all_items): """Find the item that matches these index keys.""" for item in all_items: - if all([item[key] == value for key, value in index.items()]): + if all(item[key] == value for key, value in index.items()): return item raise Exception("Index key not found in item.")