Skip to content

Commit 333f7d6

Browse files
committed
Fix incorrect typehints
1 parent c0152de commit 333f7d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

close_message/close_message.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import typing as t
22

3+
import discord
34
from discord.ext import commands
45

56
from bot import ModmailBot
@@ -24,7 +25,7 @@ class UserFriendlyDuration(time.UserFriendlyTime):
2425
def __init__(self, *, default_close_duration: t.Optional[str] = None) -> None:
2526
self.default_close_duration = default_close_duration
2627

27-
async def convert(self, ctx: commands.Context, argument: str) -> str:
28+
async def convert(self, ctx: commands.Context, argument: str) -> "UserFriendlyDuration":
2829
"""
2930
Parse the time duration if provided and prefix any message.
3031
@@ -56,7 +57,7 @@ async def convert(self, ctx: commands.Context, argument: str) -> str:
5657
class CloseMessage(commands.Cog):
5758
"""A plugin that adds a close command with a default close message."""
5859

59-
def __init__(self, bot: ModmailBot):
60+
def __init__(self, bot: ModmailBot) -> None:
6061
self.bot = bot
6162
self.close_command = self.bot.get_command('close')
6263

@@ -73,7 +74,7 @@ async def close_message(
7374
ctx: commands.Context,
7475
*,
7576
after: str = '' # noqa: F722
76-
) -> commands.Command:
77+
) -> t.Optional[discord.Message]:
7778
"""
7879
Close the current thread with a message.
7980

0 commit comments

Comments
 (0)