From 107fe8b69b08ee71be8da83a9b34fe9c8e865997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gremaud?= Date: Fri, 16 Oct 2026 00:18:52 +0200 Subject: [PATCH] chore: ruff --- polylan_submitter/loadtest/market_locustfile.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/polylan_submitter/loadtest/market_locustfile.py b/polylan_submitter/loadtest/market_locustfile.py index b68b18d..a7b0398 100644 --- a/polylan_submitter/loadtest/market_locustfile.py +++ b/polylan_submitter/loadtest/market_locustfile.py @@ -151,14 +151,20 @@ class MarketUser(HttpUser): @task(5) def place_bet(self): - open_markets = [m for m in self.markets if m["status"] == "open" and m["options"]] + open_markets = [ + m for m in self.markets if m["status"] == "open" and m["options"] + ] if not open_markets or self.points < MIN_BET_INCREMENT: return market = random.choice(open_markets) existing = self.bets.get(market["uuid"]) - option = existing["option"] if existing else random.choice(market["options"])["uuid"] - increment = random.randint(MIN_BET_INCREMENT, min(MAX_BET_INCREMENT, self.points)) + option = ( + existing["option"] if existing else random.choice(market["options"])["uuid"] + ) + increment = random.randint( + MIN_BET_INCREMENT, min(MAX_BET_INCREMENT, self.points) + ) amount = (existing["amount"] if existing else 0) + increment with self.client.post(