From ed60bc656a76eee02c40d64bfcc7e57683f75311 Mon Sep 17 00:00:00 2001 From: "sourcery-ai[bot]" <58596630+sourcery-ai[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 20:39:56 -0800 Subject: [PATCH] 'Refactored by Sourcery' (#130) Co-authored-by: Sourcery AI <> --- conreq/utils/generic.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/conreq/utils/generic.py b/conreq/utils/generic.py index e64dd17c..4397ff7a 100644 --- a/conreq/utils/generic.py +++ b/conreq/utils/generic.py @@ -10,9 +10,7 @@ def is_key_value_in_list( if isinstance(search_list, list): for item in search_list: if item.__contains__(key) and item[key] == value: - if return_item: - return item - return True + return item if return_item else True return False