From a73dc492584cf0438dc92db38f80bbc966982384 Mon Sep 17 00:00:00 2001 From: Stephan Huber Date: Thu, 28 Jun 2018 13:10:09 +0200 Subject: [PATCH] fix linting error --- moto/iot/models.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/moto/iot/models.py b/moto/iot/models.py index 0ef53bbb..c36bb985 100644 --- a/moto/iot/models.py +++ b/moto/iot/models.py @@ -281,14 +281,15 @@ class IoTBackend(BaseBackend): def list_things(self, attribute_name, attribute_value, thing_type_name, max_results, token): all_things = [_.to_dict() for _ in self.things.values()] if attribute_name is not None and thing_type_name is not None: - filtered_things = list( - filter( - lambda elem: attribute_name in elem["attributes"] and elem["attributes"][ - attribute_name] == attribute_value and "thingTypeName" in elem and elem[ - "thingTypeName"] == thing_type_name, all_things)) + filtered_things = list(filter(lambda elem: + attribute_name in elem["attributes"] and + elem["attributes"][attribute_name] == attribute_value and + "thingTypeName" in elem and + elem["thingTypeName"] == thing_type_name, all_things)) elif attribute_name is not None and thing_type_name is None: - filtered_things = list(filter(lambda elem: attribute_name in elem["attributes"] and elem["attributes"][ - attribute_name] == attribute_value, all_things)) + filtered_things = list(filter(lambda elem: + attribute_name in elem["attributes"] and + elem["attributes"][attribute_name] == attribute_value, all_things)) elif attribute_name is None and thing_type_name is not None: filtered_things = list( filter(lambda elem: "thingTypeName" in elem and elem["thingTypeName"] == thing_type_name, all_things))