From bdfadb0c11fc7112fef71d23594d300988145540 Mon Sep 17 00:00:00 2001 From: Mike Edmister Date: Thu, 25 Apr 2019 11:47:04 -0400 Subject: [PATCH] shortened lines for linter --- pyircbot/modules/StockPlay.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyircbot/modules/StockPlay.py b/pyircbot/modules/StockPlay.py index a1fa274..370ea00 100644 --- a/pyircbot/modules/StockPlay.py +++ b/pyircbot/modules/StockPlay.py @@ -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