From 97578a933f946ab83865581f65f26b5df7a89a45 Mon Sep 17 00:00:00 2001 From: Felipe Monteiro Date: Wed, 9 May 2018 02:14:08 +0100 Subject: [PATCH] [fix gate] Fix pep8 errors Fix failing pep8 errors which were never being flagged but now are, possibly due to changes in flake8 rules. This patchset corrects the following errors: ./deckhand/engine/layering.py:567:21: W503 line break before binary operator ./deckhand/engine/secrets_manager.py:406:33: W503 line break before binary operator ./deckhand/engine/utils.py:33:17: W503 line break before binary operator ./deckhand/common/utils.py:292:17: W503 line break before binary operator Change-Id: Ic26aecb6b8049e138a826af9953f45298e817795 --- deckhand/common/utils.py | 4 ++-- deckhand/engine/layering.py | 4 ++-- deckhand/engine/secrets_manager.py | 4 ++-- deckhand/engine/utils.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deckhand/common/utils.py b/deckhand/common/utils.py index c606c8b3..1f0f142f 100644 --- a/deckhand/common/utils.py +++ b/deckhand/common/utils.py @@ -288,8 +288,8 @@ def deepfilter(dct, **filters): # Else if both the filter value and the actual value in the doc # are dictionaries, check whether the filter dict is a subset # of the actual dict. - if (isinstance(actual_val, dict) - and isinstance(filter_val, dict)): + if (isinstance(actual_val, dict) and + isinstance(filter_val, dict)): is_subset = set( filter_val.items()).issubset(set(actual_val.items())) if not is_subset: diff --git a/deckhand/engine/layering.py b/deckhand/engine/layering.py index bc04c506..be109ddf 100644 --- a/deckhand/engine/layering.py +++ b/deckhand/engine/layering.py @@ -563,8 +563,8 @@ class DocumentLayering(object): parent_name=overall_data.name, action=action) - if (isinstance(from_parent, dict) - and isinstance(from_child, dict)): + if (isinstance(from_parent, dict) and + isinstance(from_child, dict)): engine_utils.deep_merge(from_parent, from_child) if from_parent is not None: diff --git a/deckhand/engine/secrets_manager.py b/deckhand/engine/secrets_manager.py index fa3079a3..09c57d5f 100644 --- a/deckhand/engine/secrets_manager.py +++ b/deckhand/engine/secrets_manager.py @@ -402,8 +402,8 @@ class SecretsSubstitution(object): substituted_data = utils.jsonpath_replace( document['data'], src_secret, dest_path, dest_pattern) - if (isinstance(document['data'], dict) - and isinstance(substituted_data, dict)): + if (isinstance(document['data'], dict) and + isinstance(substituted_data, dict)): document['data'].update(substituted_data) elif substituted_data: document['data'] = substituted_data diff --git a/deckhand/engine/utils.py b/deckhand/engine/utils.py index b6d11044..a8fbf787 100644 --- a/deckhand/engine/utils.py +++ b/deckhand/engine/utils.py @@ -29,8 +29,8 @@ def deep_merge(dct, merge_dct): :return: None """ for k, v in merge_dct.items(): - if (k in dct and isinstance(dct[k], dict) - and isinstance(merge_dct[k], collections.Mapping)): + if (k in dct and isinstance(dct[k], dict) and + isinstance(merge_dct[k], collections.Mapping)): deep_merge(dct[k], merge_dct[k]) else: dct[k] = merge_dct[k]