flake8 cleanups, ununsed imports and variables cleanup, changed register_diagnostics to use reverse_lazy instead of reverse
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user