diff options
author | Brian Waldon <bcwaldon@gmail.com> | 2012-05-24 06:56:15 -0700 |
---|---|---|
committer | Brian Waldon <bcwaldon@gmail.com> | 2012-05-24 06:59:05 -0700 |
commit | 317378f742aafd59d0aaa6c5698bbda57cbfa15a (patch) | |
tree | 6903bc2a95296a592a90372d6b0e6122ad5940e4 /tools/hacking.py | |
parent | e3d7d3a805355340f27b9626f83eda329f358fda (diff) | |
download | nova-317378f742aafd59d0aaa6c5698bbda57cbfa15a.tar.gz nova-317378f742aafd59d0aaa6c5698bbda57cbfa15a.tar.xz nova-317378f742aafd59d0aaa6c5698bbda57cbfa15a.zip |
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/hacking.py')
-rwxr-xr-x | tools/hacking.py | 8 |
1 files changed, 4 insertions, 4 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" |