PEP-8
This commit is contained in:
parent
b42aac00d5
commit
06e78b7871
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ def steamcalc(inp, reply=None):
|
||||||
|
|
||||||
# work out the average metascore for all games
|
# work out the average metascore for all games
|
||||||
ms = [float(game["metascore"]) for game in games if is_number(game["metascore"])]
|
ms = [float(game["metascore"]) for game in games if is_number(game["metascore"])]
|
||||||
metascore = float(sum(ms))/len(ms) if len(ms) > 0 else float('nan')
|
metascore = float(sum(ms)) / len(ms) if len(ms) > 0 else float('nan')
|
||||||
data["average_metascore"] = "{0:.1f}".format(metascore)
|
data["average_metascore"] = "{0:.1f}".format(metascore)
|
||||||
|
|
||||||
# work out the totals
|
# work out the totals
|
||||||
|
@ -86,7 +86,7 @@ def steamcalc(inp, reply=None):
|
||||||
if game["unit"] == "GB":
|
if game["unit"] == "GB":
|
||||||
total_size += float(game["size"])
|
total_size += float(game["size"])
|
||||||
else:
|
else:
|
||||||
total_size += float(game["size"])/1024
|
total_size += float(game["size"]) / 1024
|
||||||
|
|
||||||
data["size"] = "{0:.1f}".format(total_size)
|
data["size"] = "{0:.1f}".format(total_size)
|
||||||
|
|
||||||
|
|
Reference in a new issue