aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/fun/xkcd.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-05-06 16:12:32 +0100
committerGravatar Chris Lovering <[email protected]>2023-05-09 15:41:50 +0100
commit613840ebcf303e84048d48ace37fb001c1afe687 (patch)
tree9acaf0bae0527fe8389483a419b44e06997ca060 /bot/exts/fun/xkcd.py
parentMigrate to ruff (diff)
Apply fixes for ruff linting
Co-authored-by: wookie184 <[email protected]> Co-authored-by: Amrou Bellalouna <[email protected]>
Diffstat (limited to 'bot/exts/fun/xkcd.py')
-rw-r--r--bot/exts/fun/xkcd.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bot/exts/fun/xkcd.py b/bot/exts/fun/xkcd.py
index 380c3c80..7b34795c 100644
--- a/bot/exts/fun/xkcd.py
+++ b/bot/exts/fun/xkcd.py
@@ -1,7 +1,6 @@
import logging
import re
from random import randint
-from typing import Optional, Union
from discord import Embed
from discord.ext import tasks
@@ -21,7 +20,7 @@ class XKCD(Cog):
def __init__(self, bot: Bot):
self.bot = bot
- self.latest_comic_info: dict[str, Union[str, int]] = {}
+ self.latest_comic_info: dict[str, str | int] = {}
self.get_latest_comic_info.start()
def cog_unload(self) -> None:
@@ -38,7 +37,7 @@ class XKCD(Cog):
log.debug(f"Failed to get latest XKCD comic information. Status code {resp.status}")
@command(name="xkcd")
- async def fetch_xkcd_comics(self, ctx: Context, comic: Optional[str]) -> None:
+ async def fetch_xkcd_comics(self, ctx: Context, comic: str | None) -> None:
"""
Getting an xkcd comic's information along with the image.