[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
This commit is contained in:
parent
8538ff5671
commit
97578a933f
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user