shortened lines for linter

This commit is contained in:
Mike Edmister 2019-04-25 11:47:04 -04:00
parent ca3b4f903f
commit bdfadb0c11
1 changed files with 4 additions and 2 deletions

View File

@ -156,8 +156,10 @@ class StockPlay(ModuleBase):
self.log.warning("{} wants top 10 sent to {}".format(nick, replyto))
with closing(self.sql.getCursor()) as c:
for num, row in enumerate(c.execute("""SELECT h1.nick as nick, CAST(h1.cents as INTEGER) as cents FROM stockplay_balance_history h1
INNER JOIN (SELECT nick, max(day) as MaxDate FROM stockplay_balance_history WHERE nick != ? GROUP BY nick) h2
for num, row in enumerate(c.execute("""SELECT h1.nick as nick, CAST(h1.cents as INTEGER) as cents
FROM stockplay_balance_history h1
INNER JOIN (SELECT nick, max(day) as MaxDate FROM stockplay_balance_history
WHERE nick != ? GROUP BY nick) h2
ON h1.nick = h2.nick AND h1.day = h2.MaxDate
ORDER BY cents DESC LIMIT 10""", (DUSTACCT, )).fetchall(), start=1):
total = Decimal(row.cents) / 100