From f5080e539dd140e556c0a280d9770b552d9aeaba Mon Sep 17 00:00:00 2001 From: "heyder.dias" Date: Thu, 5 Mar 2020 18:39:20 -0300 Subject: [PATCH] fix lint check --- moto/dynamodb2/models.py | 4 +--- tests/test_dynamodb2/test_dynamodb.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/moto/dynamodb2/models.py b/moto/dynamodb2/models.py index 7d995486d..8e5a61755 100644 --- a/moto/dynamodb2/models.py +++ b/moto/dynamodb2/models.py @@ -452,9 +452,7 @@ class Item(BaseModel): if old_list_key.startswith("if_not_exists"): old_list = self._get_default(old_list_key) if not isinstance(old_list, DynamoType): - old_list = DynamoType( - expression_attribute_values[old_list] - ) + old_list = DynamoType(expression_attribute_values[old_list]) else: old_list = self.attrs[old_list_key.split(".")[0]] if "." in old_list_key: diff --git a/tests/test_dynamodb2/test_dynamodb.py b/tests/test_dynamodb2/test_dynamodb.py index d36fdc7fa..428b58f81 100644 --- a/tests/test_dynamodb2/test_dynamodb.py +++ b/tests/test_dynamodb2/test_dynamodb.py @@ -3648,7 +3648,7 @@ def test_update_supports_list_append_with_nested_if_not_exists_operation_and_pro table = dynamo.Table(table_name) - table.put_item(Item={"Id": "item-id", "event_history":["other_value"]}) + table.put_item(Item={"Id": "item-id", "event_history": ["other_value"]}) table.update_item( Key={"Id": "item-id"}, UpdateExpression="SET event_history = list_append(if_not_exists(event_history, :empty_list), :new_value)",