summaryrefslogtreecommitdiff
path: root/lib/ansible/errors
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2017-03-22 20:50:28 -0500
committerGitHub <noreply@github.com>2017-03-22 20:50:28 -0500
commit3164e8b561931b413ee91f537e2ea3273b0a1775 (patch)
treee81009f7a38d26b4c537a6ea0e559d76ef0578b8 /lib/ansible/errors
parent4fdeade3897a5808ccdb6eb002c4a8ebbe794811 (diff)
downloadansible-3164e8b561931b413ee91f537e2ea3273b0a1775.tar.gz
E501 fixes (#22879)
Diffstat (limited to 'lib/ansible/errors')
-rw-r--r--lib/ansible/errors/__init__.py12
1 files changed, 10 insertions, 2 deletions
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: