From 613840ebcf303e84048d48ace37fb001c1afe687 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Sat, 6 May 2023 16:12:32 +0100 Subject: Apply fixes for ruff linting Co-authored-by: wookie184 Co-authored-by: Amrou Bellalouna --- bot/exts/fun/xkcd.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bot/exts/fun/xkcd.py') 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. -- cgit v1.2.3