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

@@ -83,7 +83,7 @@ class Streams(commands.Cog):
self._init_task: asyncio.Task = asyncio.create_task(self.initialize())
async def red_delete_data_for_user(self, **kwargs):
""" Nothing to delete """
"""Nothing to delete"""
return
def check_name_or_id(self, data: str) -> bool:

View File

@@ -263,7 +263,6 @@ class YoutubeStream(Stream):
return snippet["title"]
async def _fetch_channel_resource(self, resource: str):
params = {"key": self._token["api_key"], "part": resource}
if resource == "id":
params["forUsername"] = self.name
@@ -334,8 +333,8 @@ class TwitchStream(Stream):
"""
current_time = int(time.time())
self._rate_limit_resets = {x for x in self._rate_limit_resets if x > current_time}
if self._rate_limit_remaining == 0:
if self._rate_limit_remaining == 0:
if self._rate_limit_resets:
reset_time = next(iter(self._rate_limit_resets))
# Calculate wait time and add 0.1s to the wait time to allow Twitch to reset