From eb084af27a317228bee1e198ee2f7a13d2a9346f Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Fri, 20 Sep 2024 09:00:16 -0400 Subject: [PATCH] fix(currency): type hinting errors --- canary/cogs/currency.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/canary/cogs/currency.py b/canary/cogs/currency.py index d964b176..611958b2 100644 --- a/canary/cogs/currency.py +++ b/canary/cogs/currency.py @@ -131,7 +131,7 @@ def format_symbol_currency(self, amount: Decimal) -> str: return self.symbol + self.format_currency(amount) @staticmethod - def check_bet(balance: Decimal, bet: Decimal) -> str | None: + def check_bet(balance: Decimal, bet: Decimal | None) -> str | None: """ Checks universally invalid betting cases. """ @@ -153,6 +153,8 @@ def check_bet(balance: Decimal, bet: Decimal) -> str | None: if bet > balance: return "You're too broke to bet that much!" + return None + async def get_last_claim_time(self, db: aiosqlite.Connection, author: discord.Member | discord.User) -> int | None: claim_time_t = await self.fetch_one( "SELECT IFNULL(MAX(Date), 0) FROM BankTransactions WHERE UserID = ? AND Action = ?",