From 6c669dd170d939663570f296f4032a73397c4bb7 Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 14 Jan 2021 11:32:51 -0500 Subject: [PATCH] Change typing --- werewolf/werewolf.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/werewolf/werewolf.py b/werewolf/werewolf.py index 2074c48..a4083a9 100644 --- a/werewolf/werewolf.py +++ b/werewolf/werewolf.py @@ -1,11 +1,10 @@ import logging -from typing import List, Union +from typing import Optional import discord from redbot.core import Config, checks, commands from redbot.core.bot import Red from redbot.core.commands import Cog -from redbot.core.utils import AsyncIter from redbot.core.utils.menus import DEFAULT_CONTROLS, menu from werewolf.builder import ( @@ -392,7 +391,7 @@ class Werewolf(Cog): else: await ctx.maybe_send_embed("Role ID not found") - async def _get_game(self, ctx: commands.Context, game_code=None) -> Union[Game, None]: + async def _get_game(self, ctx: commands.Context, game_code=None) -> Optional[Game]: guild: discord.Guild = getattr(ctx, "guild", None) if guild is None: @@ -419,7 +418,7 @@ class Werewolf(Cog): return self.games[guild.id] - async def _game_start(self, game): + async def _game_start(self, game: Game): await game.start() async def _get_settings(self, ctx):