summaryrefslogtreecommitdiffstats
path: root/tools/hacking.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-05-31 22:19:07 +0000
committerGerrit Code Review <review@openstack.org>2012-05-31 22:19:07 +0000
commit79cb3bf9d9559cba5c59ea47f30147bfe89faecb (patch)
treeec50b2fb4fd5a481eedbe0a0b99c14f91f248dd7 /tools/hacking.py
parentf86ef06e6d5a9b3e0039e05c42b45ec136a17862 (diff)
parent61c5597a09945982f093412cd134850346b82e3b (diff)
downloadnova-79cb3bf9d9559cba5c59ea47f30147bfe89faecb.tar.gz
nova-79cb3bf9d9559cba5c59ea47f30147bfe89faecb.tar.xz
nova-79cb3bf9d9559cba5c59ea47f30147bfe89faecb.zip
Merge "Backslash continuation removal (Nova folsom-2)"
Diffstat (limited to 'tools/hacking.py')
-rwxr-xr-xtools/hacking.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/hacking.py b/tools/hacking.py
index 7fea734b6..93e51e66c 100755
--- a/tools/hacking.py
+++ b/tools/hacking.py
@@ -48,8 +48,8 @@ VERBOSE_MISSING_IMPORT = False
def is_import_exception(mod):
- return mod in IMPORT_EXCEPTIONS or \
- any(mod.startswith(m + '.') for m in IMPORT_EXCEPTIONS)
+ return (mod in IMPORT_EXCEPTIONS or
+ any(mod.startswith(m + '.') for m in IMPORT_EXCEPTIONS))
def import_normalize(line):
@@ -114,9 +114,9 @@ def nova_one_import_per_line(logical_line):
"""
pos = logical_line.find(',')
parts = logical_line.split()
- if pos > -1 and (parts[0] == "import" or
- parts[0] == "from" and parts[2] == "import") and \
- not is_import_exception(parts[1]):
+ if (pos > -1 and (parts[0] == "import" or
+ parts[0] == "from" and parts[2] == "import") and
+ not is_import_exception(parts[1])):
return pos, "NOVA N301: one import per line"
_missingImport = set([])