fixing Python 3.9 compat

This commit is contained in:
Frisk 2024-08-29 18:49:55 +02:00
parent 4112187cd2
commit 8b93ae8e68
2 changed files with 5 additions and 1 deletions

View file

@ -14,6 +14,7 @@
"pg_port": "5432",
"redis_host": "localhost",
"ignored": [],
"max_discord_additional_await_time": 120,
"irc_servers": {
"your custom name for the farm": {
"domains": ["wikipedia.org", "otherwikipedia.org"],

View file

@ -1,3 +1,6 @@
from typing import Union
class WikiError(Exception):
pass
@ -71,6 +74,6 @@ class WikiExists(Exception):
class ExhaustedDiscordBucket(BaseException):
def __init__(self, remaining: int | float, is_global: bool):
def __init__(self, remaining: Union[int, float], is_global: bool):
self.remaining = remaining
self.is_global = is_global