PEP 8 (I'm bored): core/util

This commit is contained in:
enkore 2014-10-14 16:51:58 +02:00
parent b2b34ad81a
commit 9e06145389

View File

@ -364,6 +364,7 @@ def internet():
except OSError: except OSError:
return False return False
def make_graph(values, upper_limit=100.0): def make_graph(values, upper_limit=100.0):
""" """
Draws a graph made of unicode characters. Draws a graph made of unicode characters.
@ -385,8 +386,8 @@ def make_graph(values, upper_limit=100.0):
if extent == 0: if extent == 0:
graph = '_' * len(values) graph = '_' * len(values)
else: else:
graph = ''.join(bar[int( (n - mn) / extent * bar_count)] graph = ''.join(bar[int((n - mn) / extent * bar_count)]
for n in values[:len(values)-1]) # Don't show the upper limit value. for n in values[:len(values) - 1]) # Don't show the upper limit value.
return graph return graph
@ -442,4 +443,3 @@ def user_open(url_or_command):
else: else:
import subprocess import subprocess
subprocess.Popen(url_or_command, shell=True) subprocess.Popen(url_or_command, shell=True)