Skip to content

chore: Fix pylint R1729(use-a-generator) #151

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
Feb 26, 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
4 changes: 2 additions & 2 deletions examples/src/aws_kms_encrypted_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ 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.")

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.")
Expand Down
4 changes: 2 additions & 2 deletions examples/src/aws_kms_encrypted_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ 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.")

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.")
Expand Down