Reformat with Black 22.1.0

This commit is contained in:
jack1142
2022-03-22 18:06:46 +01:00
parent f6d9632c8f
commit c69e8d31fd
39 changed files with 25 additions and 78 deletions

View File

@@ -167,7 +167,6 @@ class FormattingUtilities(MixinMeta, metaclass=CompositeMetaClass):
ctx, title=_("This track is not allowed in this server.")
)
elif guild_data["maxlength"] > 0:
if self.is_track_length_allowed(search_choice, guild_data["maxlength"]):
search_choice.extras.update(
{

View File

@@ -258,7 +258,7 @@ class MiscellaneousUtilities(MixinMeta, metaclass=CompositeMetaClass):
return msg.format(d, h, m, s)
def format_time(self, time: int) -> str:
""" Formats the given time into DD:HH:MM:SS """
"""Formats the given time into DD:HH:MM:SS"""
seconds = time / 1000
days, seconds = divmod(seconds, 24 * 60 * 60)
hours, seconds = divmod(seconds, 60 * 60)

View File

@@ -11,7 +11,7 @@ from ..cog_utils import CompositeMetaClass
log = getLogger("red.cogs.Audio.cog.Utilities.Parsing")
STREAM_TITLE: Final[re.Pattern] = re.compile(br"StreamTitle='([^']*)';")
STREAM_TITLE: Final[re.Pattern] = re.compile(rb"StreamTitle='([^']*)';")
class ParsingUtilities(MixinMeta, metaclass=CompositeMetaClass):

View File

@@ -676,7 +676,6 @@ class PlaylistUtilities(MixinMeta, metaclass=CompositeMetaClass):
def humanize_scope(
self, scope: str, ctx: Union[discord.Guild, discord.abc.User, str] = None, the: bool = None
) -> Optional[str]:
if scope == PlaylistScope.GLOBAL.value:
return _("the Global") if the else _("Global")
elif scope == PlaylistScope.GUILD.value: