diff options
| author | Ultrabug <ultrabug@gentoo.org> | 2014-08-22 14:46:04 +0200 |
|---|---|---|
| committer | Ultrabug <ultrabug@gentoo.org> | 2014-08-22 14:46:04 +0200 |
| commit | 0e49068589883ead96e486a765501d434ca48c66 (patch) | |
| tree | a97c13326157e815265094e2f809511989ecbe8c | |
| parent | 39266f2f01350caf1025869cbef1d0362b66adc8 (diff) | |
change MULTIPLIER_TOP and PEP8 compliance wrt commit 39266f2
| -rw-r--r-- | modules/net_rate.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/net_rate.py b/modules/net_rate.py index e8c0f1d..dff075c 100644 --- a/modules/net_rate.py +++ b/modules/net_rate.py @@ -32,8 +32,8 @@ Placeholders: FORMAT = "{interface}: {total}" PRECISION = 1 # amount of numbers after dot -MULTIPLIER_TOP = 1024 # if value is greater, divide it with UNIT_MULTI and get next unit from UNITS -LEFT_ALIGN = len(str(MULTIPLIER_TOP)) + PRECISION # == 5 characters (from MULTIPLIER_TOP + PRECISION) +MULTIPLIER_TOP = 999 # if value is greater, divide it with UNIT_MULTI and get next unit from UNITS +LEFT_ALIGN = len(str(MULTIPLIER_TOP)) + 1 + PRECISION # == 6 characters (from MULTIPLIER_TOP + dot + PRECISION) """ Format of total, up and down placeholders under FORMAT. @@ -53,10 +53,10 @@ NO_CONNECTION = "! no data" # when there is no data transmitted from the start HIDE_IF_NO = False # hide indicator if rate == 0 -""" -Get statistics from devfile in list of lists of words -""" def get_stat(): + """ + Get statistics from devfile in list of lists of words + """ def dev_filter(x): # get first word and remove trailing interface number x = x.strip().split(" ")[0][:-1] @@ -83,10 +83,10 @@ def get_stat(): return None -""" -Divide a value and return formatted string -""" def divide_and_format(value): + """ + Divide a value and return formatted string + """ for i, unit in enumerate(UNITS): if value > MULTIPLIER_TOP: value /= UNIT_MULTI |
