diff options
Diffstat (limited to 'bot/seasons/halloween/timeleft.py')
| -rw-r--r-- | bot/seasons/halloween/timeleft.py | 11 | 
1 files changed, 6 insertions, 5 deletions
| diff --git a/bot/seasons/halloween/timeleft.py b/bot/seasons/halloween/timeleft.py index a2b16a6c..77767baa 100644 --- a/bot/seasons/halloween/timeleft.py +++ b/bot/seasons/halloween/timeleft.py @@ -1,5 +1,6 @@  import logging  from datetime import datetime +from typing import Tuple  from discord.ext import commands @@ -9,16 +10,16 @@ log = logging.getLogger(__name__)  class TimeLeft(commands.Cog):      """A Cog that tells you how long left until Hacktober is over!""" -    def __init__(self, bot): +    def __init__(self, bot: commands.Bot):          self.bot = bot      @staticmethod -    def in_october(): +    def in_october() -> bool:          """Return True if the current month is October."""          return datetime.utcnow().month == 10      @staticmethod -    def load_date(): +    def load_date() -> Tuple[int, datetime, datetime]:          """Return of a tuple of the current time and the end and start times of the next October."""          now = datetime.utcnow()          year = now.year @@ -29,7 +30,7 @@ class TimeLeft(commands.Cog):          return now, end, start      @commands.command() -    async def timeleft(self, ctx): +    async def timeleft(self, ctx: commands.Context) -> None:          """          Calculates the time left until the end of Hacktober. @@ -53,7 +54,7 @@ class TimeLeft(commands.Cog):              ) -def setup(bot): +def setup(bot: commands.Bot) -> None:      """Cog load."""      bot.add_cog(TimeLeft(bot))      log.info("TimeLeft cog loaded") | 
