dota2win: allow formatting of win percentage by passing it as float, not preformatted string
See example format on how to do that.
This commit is contained in:
parent
e85425c8c6
commit
bea95ab5e4
@ -38,7 +38,7 @@ class Dota2wins(IntervalModule):
|
|||||||
matches = 25
|
matches = 25
|
||||||
interval = 1800
|
interval = 1800
|
||||||
screenname = 'retrieve'
|
screenname = 'retrieve'
|
||||||
format = "{screenname} {wins}W:{losses}L {win_percent}%"
|
format = "{screenname} {wins}W:{losses}L {win_percent:.2f}%"
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
api.set_api_key(self.steam_api_key)
|
api.set_api_key(self.steam_api_key)
|
||||||
@ -96,7 +96,7 @@ class Dota2wins(IntervalModule):
|
|||||||
"screenname": screenname,
|
"screenname": screenname,
|
||||||
"wins": wins,
|
"wins": wins,
|
||||||
"losses": losses,
|
"losses": losses,
|
||||||
"win_percent": "%.2f" % win_percent,
|
"win_percent": win_percent,
|
||||||
}
|
}
|
||||||
|
|
||||||
self.output = {
|
self.output = {
|
||||||
|
Loading…
Reference in New Issue
Block a user