chore: ruff

This commit is contained in:
2026-10-16 00:18:52 +02:00
parent 15ab9a14ac
commit 107fe8b69b
@@ -151,14 +151,20 @@ class MarketUser(HttpUser):
@task(5) @task(5)
def place_bet(self): 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: if not open_markets or self.points < MIN_BET_INCREMENT:
return return
market = random.choice(open_markets) market = random.choice(open_markets)
existing = self.bets.get(market["uuid"]) existing = self.bets.get(market["uuid"])
option = existing["option"] if existing else random.choice(market["options"])["uuid"] option = (
increment = random.randint(MIN_BET_INCREMENT, min(MAX_BET_INCREMENT, self.points)) 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 amount = (existing["amount"] if existing else 0) + increment
with self.client.post( with self.client.post(