flake8 cleanups, ununsed imports and variables cleanup, changed register_diagnostics to use reverse_lazy instead of reverse

This commit is contained in:
Roberto Rosario
2011-05-06 10:39:54 -04:00
parent c40b3eec66
commit 07e9b12e78
14 changed files with 33 additions and 40 deletions

View File

@@ -94,7 +94,7 @@ def pretty_size(size, suffixes=None):
def pretty_size_10(size):
return pretty_size(
size,
size,
suffixes=[
(u'B', 1000L), (u'K', 1000000L), (u'M', 1000000000L),
(u'G', 1000000000000L), (u'T', 1000000000000000L)
@@ -302,12 +302,12 @@ def return_type(value):
return ','.join(list(value))
else:
return value
# http://stackoverflow.com/questions/4248399/page-range-for-printing-algorithm
def parse_range(astr):
result=set()
result = set()
for part in astr.split(u','):
x=part.split(u'-')
result.update(range(int(x[0]),int(x[-1])+1))
x = part.split(u'-')
result.update(range(int(x[0]), int(x[-1]) + 1))
return sorted(result)