Skip to content

Commit 4b2a745

Browse files
committed
add pylint ignores for no-member checks on generated code
1 parent 42d7b3d commit 4b2a745

6 files changed

+9
-7
lines changed

examples/src/aws_kms_encrypted_item.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def encrypt_item(table_name, aws_cmk_id):
4141
plaintext_item.update(index_key)
4242

4343
# Create a normal table resource.
44-
table = boto3.resource("dynamodb").Table(table_name)
44+
table = boto3.resource("dynamodb").Table(table_name) # generated code confuse pylint: disable=no-member
4545

4646
# Use the TableInfo helper to collect information about the indexes.
4747
table_info = TableInfo(name=table_name)

examples/src/aws_kms_encrypted_resource.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ def encrypt_batch_items(table_name, aws_cmk_id):
6464
)
6565

6666
# Get the encrypted item using the standard service resource.
67-
encrypted_items = resource.batch_get_item(RequestItems={table_name: {"Keys": index_keys}})["Responses"][table_name]
67+
encrypted_items = resource.batch_get_item( # generated code confuse pylint: disable=no-member
68+
RequestItems={table_name: {"Keys": index_keys}}
69+
)["Responses"][table_name]
6870

6971
# Get the item using the encrypted service resource, transparently decyrpting it.
7072
decrypted_items = encrypted_resource.batch_get_item(RequestItems={table_name: {"Keys": index_keys}})["Responses"][

examples/src/aws_kms_encrypted_table.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def encrypt_item(table_name, aws_cmk_id):
3939
plaintext_item.update(index_key)
4040

4141
# Create a normal table resource.
42-
table = boto3.resource("dynamodb").Table(table_name)
42+
table = boto3.resource("dynamodb").Table(table_name) # generated code confuse pylint: disable=no-member
4343
# Create a crypto materials provider using the specified AWS KMS key.
4444
aws_kms_cmp = AwsKmsCryptographicMaterialsProvider(key_id=aws_cmk_id)
4545
# Create attribute actions that tells the encrypted table to encrypt all attributes except one.

examples/src/most_recent_provider_encrypted_table.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def encrypt_item(table_name, aws_cmk_id, meta_table_name, material_name):
4141
plaintext_item.update(index_key)
4242

4343
# Create a normal table resource for the meta store.
44-
meta_table = boto3.resource("dynamodb").Table(meta_table_name)
44+
meta_table = boto3.resource("dynamodb").Table(meta_table_name) # generated code confuse pylint: disable=no-member
4545
# Create a crypto materials provider for the meta store using the specified AWS KMS key.
4646
aws_kms_cmp = AwsKmsCryptographicMaterialsProvider(key_id=aws_cmk_id)
4747
# Create a meta store using the AWS KMS crypto materials provider.
@@ -53,7 +53,7 @@ def encrypt_item(table_name, aws_cmk_id, meta_table_name, material_name):
5353
version_ttl=600.0, # Check for a new material version every five minutes.
5454
)
5555
# Create a normal table resource.
56-
table = boto3.resource("dynamodb").Table(table_name)
56+
table = boto3.resource("dynamodb").Table(table_name) # generated code confuse pylint: disable=no-member
5757
# Create attribute actions that tells the encrypted table to encrypt all attributes except one.
5858
actions = AttributeActions(
5959
default_action=CryptoAction.ENCRYPT_AND_SIGN, attribute_actions={"leave me": CryptoAction.DO_NOTHING}

examples/src/wrapped_rsa_encrypted_table.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def encrypt_item(table_name, rsa_wrapping_private_key_bytes, rsa_signing_private
4040
plaintext_item.update(index_key)
4141

4242
# Create a normal table resource.
43-
table = boto3.resource("dynamodb").Table(table_name)
43+
table = boto3.resource("dynamodb").Table(table_name) # generated code confuse pylint: disable=no-member
4444
# Create a crypto materials provider using the provided wrapping and signing keys.
4545
# We show private keys used here, but public keys could be used as well, allowing
4646
# only wrapping or signature verification.

examples/src/wrapped_symmetric_encrypted_table.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def encrypt_item(table_name, aes_wrapping_key_bytes, hmac_signing_key_bytes):
4040
plaintext_item.update(index_key)
4141

4242
# Create a normal table resource.
43-
table = boto3.resource("dynamodb").Table(table_name)
43+
table = boto3.resource("dynamodb").Table(table_name) # generated code confuse pylint: disable=no-member
4444
# Create a crypto materials provider using the provided wrapping and signing keys.
4545
wrapping_key = JceNameLocalDelegatedKey(
4646
key=aes_wrapping_key_bytes,

0 commit comments

Comments
 (0)