From 3164e8b561931b413ee91f537e2ea3273b0a1775 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Wed, 22 Mar 2017 20:50:28 -0500 Subject: E501 fixes (#22879) --- lib/ansible/errors/__init__.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/ansible/errors') diff --git a/lib/ansible/errors/__init__.py b/lib/ansible/errors/__init__.py index b2bf10dad2..3bfed1dbbf 100644 --- a/lib/ansible/errors/__init__.py +++ b/lib/ansible/errors/__init__.py @@ -123,7 +123,11 @@ class AnsibleError(Exception): elif ":{{" in stripped_line and "}}" in stripped_line: error_message += YAML_COMMON_DICT_ERROR # check for common unquoted colon mistakes - elif len(target_line) and len(target_line) > 1 and len(target_line) > col_number and target_line[col_number] == ":" and target_line.count(':') > 1: + elif (len(target_line) and + len(target_line) > 1 and + len(target_line) > col_number and + target_line[col_number] == ":" and + target_line.count(':') > 1): error_message += YAML_COMMON_UNQUOTED_COLON_ERROR # otherwise, check for some common quoting mistakes else: @@ -138,7 +142,11 @@ class AnsibleError(Exception): elif middle.startswith('"') and not middle.endswith('"'): match = True - if len(middle) > 0 and middle[0] in [ '"', "'" ] and middle[-1] in [ '"', "'" ] and target_line.count("'") > 2 or target_line.count('"') > 2: + if (len(middle) > 0 and + middle[0] in [ '"', "'" ] and + middle[-1] in [ '"', "'" ] and + target_line.count("'") > 2 or + target_line.count('"') > 2): unbalanced = True if match: -- cgit v1.2.1