shortened lines for linter
This commit is contained in:
parent
ca3b4f903f
commit
bdfadb0c11
|
@ -156,8 +156,10 @@ class StockPlay(ModuleBase):
|
||||||
self.log.warning("{} wants top 10 sent to {}".format(nick, replyto))
|
self.log.warning("{} wants top 10 sent to {}".format(nick, replyto))
|
||||||
|
|
||||||
with closing(self.sql.getCursor()) as c:
|
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
|
for num, row in enumerate(c.execute("""SELECT h1.nick as nick, CAST(h1.cents as INTEGER) as cents
|
||||||
INNER JOIN (SELECT nick, max(day) as MaxDate FROM stockplay_balance_history WHERE nick != ? GROUP BY nick) h2
|
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
|
ON h1.nick = h2.nick AND h1.day = h2.MaxDate
|
||||||
ORDER BY cents DESC LIMIT 10""", (DUSTACCT, )).fetchall(), start=1):
|
ORDER BY cents DESC LIMIT 10""", (DUSTACCT, )).fetchall(), start=1):
|
||||||
total = Decimal(row.cents) / 100
|
total = Decimal(row.cents) / 100
|
||||||
|
|
Loading…
Reference in New Issue