From 9b0df33c90326f62d699afc70c13d3d375affeab Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 1 Jun 2020 23:08:32 +0200 Subject: Fix Formatting/Styling --- bot/cogs/moderation/silence.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/bot/cogs/moderation/silence.py b/bot/cogs/moderation/silence.py index a2fd39906..448f17966 100644 --- a/bot/cogs/moderation/silence.py +++ b/bot/cogs/moderation/silence.py @@ -6,11 +6,12 @@ from contextlib import suppress from typing import Optional from bot.bot import Bot -from bot.constants import MODERATION_ROLES, Channels, Emojis, Guild, Roles +from bot.constants import Channels, Emojis, Guild, MODERATION_ROLES, Roles from bot.converters import HushDurationConverter from bot.utils import time from bot.utils.checks import with_role_check from bot.utils.scheduling import Scheduler + from discord import TextChannel from discord.ext import commands, tasks from discord.ext.commands import Context @@ -23,7 +24,7 @@ SilencedChannel = namedtuple( class UnsilenceScheduler(Scheduler): - """Scheduler for unsilencing channels""" + """Scheduler for unsilencing channels.""" def __init__(self, bot: Bot): super().__init__() @@ -31,17 +32,13 @@ class UnsilenceScheduler(Scheduler): self.bot = bot async def schedule_unsilence(self, channel: SilencedChannel) -> None: - """Schedule expiration for silenced channels""" + """Schedule expiration for silenced channels.""" await self.bot.wait_until_guild_available() log.debug("Scheduling unsilencer") self.schedule_task(channel.id, channel) async def _scheduled_task(self, channel: SilencedChannel) -> None: - """ - Removes expired silenced channel from `silence.muted_channels` - and calls `silence.unsilence` to unsilence the channel - after the silence expires - """ + """Calls `silence.unsilence` on expired silenced channel to unsilence it.""" await time.wait_until(channel.stop) log.info("Unsilencing channel after set delay.") -- cgit v1.2.3