Skip to content

Commit 069de61

Browse files
authored
chore: Fix pylint R1729(use-a-generator) (#151)
1 parent 3ebe7ec commit 069de61

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: examples/src/aws_kms_encrypted_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ def encrypt_batch_items(table_name, aws_cmk_id):
124124
def _select_index_from_item(item):
125125
"""Find the index keys that match this item."""
126126
for index in index_keys:
127-
if all([item[key] == value for key, value in index.items()]):
127+
if all(item[key] == value for key, value in index.items()):
128128
return index
129129

130130
raise Exception("Index key not found in item.")
131131

132132
def _select_item_from_index(index, all_items):
133133
"""Find the item that matches these index keys."""
134134
for item in all_items:
135-
if all([item[key] == value for key, value in index.items()]):
135+
if all(item[key] == value for key, value in index.items()):
136136
return item
137137

138138
raise Exception("Index key not found in item.")

Diff for: examples/src/aws_kms_encrypted_resource.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ def encrypt_batch_items(table_name, aws_cmk_id):
7676
def _select_index_from_item(item):
7777
"""Find the index keys that match this item."""
7878
for index in index_keys:
79-
if all([item[key] == value for key, value in index.items()]):
79+
if all(item[key] == value for key, value in index.items()):
8080
return index
8181

8282
raise Exception("Index key not found in item.")
8383

8484
def _select_item_from_index(index, all_items):
8585
"""Find the item that matches these index keys."""
8686
for item in all_items:
87-
if all([item[key] == value for key, value in index.items()]):
87+
if all(item[key] == value for key, value in index.items()):
8888
return item
8989

9090
raise Exception("Index key not found in item.")

0 commit comments

Comments
 (0)