summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBrian Waldon <bcwaldon@gmail.com>2012-05-24 06:56:15 -0700
committerBrian Waldon <bcwaldon@gmail.com>2012-05-24 06:59:05 -0700
commit317378f742aafd59d0aaa6c5698bbda57cbfa15a (patch)
tree6903bc2a95296a592a90372d6b0e6122ad5940e4 /tools
parente3d7d3a805355340f27b9626f83eda329f358fda (diff)
Update pep8 dependency to v1.1
The latest release of pep8 adds stricter rules for extraneous whitespace within lines. This patch also addresses these new violations acoss the codebase. Change-Id: Ib7e50281870473df1704ed50868c5c2e26bdb02e
Diffstat (limited to 'tools')
-rwxr-xr-xtools/hacking.py8
-rw-r--r--tools/test-requires2
-rw-r--r--tools/xenserver/vdi_chain_cleanup.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/tools/hacking.py b/tools/hacking.py
index 6a9b1bdc8..485030f99 100755
--- a/tools/hacking.py
+++ b/tools/hacking.py
@@ -61,7 +61,7 @@ def import_normalize(line):
split_line[2] == "import" and split_line[3] != "*" and
split_line[1] != "__future__" and
(len(split_line) == 4 or
- (len(split_line) == 6 and split_line[4] == "as"))):
+ (len(split_line) == 6 and split_line[4] == "as"))):
mod = split_line[3]
return "import %s.%s" % (split_line[1], split_line[3])
else:
@@ -214,8 +214,8 @@ def nova_import_alphabetical(physical_line, line_number, lines):
).strip().lower().split()
# with or without "as y"
length = [2, 4]
- if (len(split_line) in length and len(split_previous) in length and
- split_line[0] == "import" and split_previous[0] == "import"):
+ if (len(split_line) in length and len(split_previous) in length and
+ split_line[0] == "import" and split_previous[0] == "import"):
if split_line[1] < split_previous[1]:
return (0, "NOVA N306: imports not in alphabetical order (%s, %s)"
% (split_previous[1], split_line[1]))
@@ -244,7 +244,7 @@ def nova_docstring_one_line(physical_line):
"""
pos = max([physical_line.find(i) for i in DOCSTRING_TRIPLE]) # start
end = max([physical_line[-4:-1] == i for i in DOCSTRING_TRIPLE]) # end
- if (pos != -1 and end and len(physical_line) > pos + 4):
+ if (pos != -1 and end and len(physical_line) > pos + 4):
if (physical_line[-5] != '.'):
return pos, "NOVA N402: one line docstring needs a period"
diff --git a/tools/test-requires b/tools/test-requires
index 337e6e388..51ef2ff63 100644
--- a/tools/test-requires
+++ b/tools/test-requires
@@ -6,6 +6,6 @@ mox==0.5.3
nose
nosexcover
openstack.nose_plugin
-pep8==1.0.1
+pep8==1.1
sphinx>=1.1.2
MySQL-python
diff --git a/tools/xenserver/vdi_chain_cleanup.py b/tools/xenserver/vdi_chain_cleanup.py
index 4d4892d8b..de1744c5b 100644
--- a/tools/xenserver/vdi_chain_cleanup.py
+++ b/tools/xenserver/vdi_chain_cleanup.py
@@ -94,7 +94,7 @@ def main():
stdout = stdout.strip()
- if stdout.endswith('.vhd'):
+ if stdout.endswith('.vhd'):
try:
descendents[stdout].append(fname)
except KeyError: