From ccbdba58bbb246bae759003a0d25dcb0b3aeeabd Mon Sep 17 00:00:00 2001 From: jackra1n <45038833+jackra1n@users.noreply.github.com> Date: Thu, 14 Mar 2024 13:07:15 +0100 Subject: [PATCH] Cast everything to float --- bot/cogs/karma.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/cogs/karma.py b/bot/cogs/karma.py index e8a979e..fc3e962 100644 --- a/bot/cogs/karma.py +++ b/bot/cogs/karma.py @@ -919,8 +919,8 @@ async def _update_kasino_msg(bot: Substiify, kasino_id: int) -> None: def _calculate_odds(bets_a_amount: float, bets_b_amount: float) -> tuple[float, float]: total_bets: float = float(bets_a_amount) + float(bets_b_amount) - a_odds: float = total_bets / bets_a_amount if bets_a_amount else 1.0 - b_odds: float = total_bets / bets_b_amount if bets_b_amount else 1.0 + a_odds: float = float(total_bets) / float(bets_a_amount) if bets_a_amount else 1.0 + b_odds: float = float(total_bets) / float(bets_b_amount) if bets_b_amount else 1.0 return a_odds, b_odds