Lint project

This commit is contained in:
Deko
2023-03-03 20:50:53 +01:00
parent 8079262154
commit 08c0cdff5a
3 changed files with 5 additions and 9 deletions

View File

@@ -2,7 +2,6 @@ import os
import requests import requests
from loguru import logger from loguru import logger
from twitch_client import StreamInformation from twitch_client import StreamInformation

View File

@@ -1,11 +1,10 @@
import os import os
import time import time
from discord_client import DiscordClient
from loguru import logger from loguru import logger
from requests import HTTPError from requests import HTTPError
from twitch_client import StreamInformation, TwitchClient
from discord_client import DiscordClient
from twitch_client import TwitchClient, StreamInformation
class Main: class Main:

View File

@@ -34,10 +34,8 @@ class StreamInformation:
@property @property
def thumbnail_url(self): def thumbnail_url(self):
return ( return self._thumbnail_url.replace("{width}", "1280").replace(
self._thumbnail_url "{height}", "720"
.replace("{width}", "1280")
.replace("{height}", "720")
) )
@@ -145,7 +143,7 @@ class TwitchClient:
started_at=stream_data.get("started_at"), started_at=stream_data.get("started_at"),
_thumbnail_url=self._cache_prevent.prevent_cache_on_url( _thumbnail_url=self._cache_prevent.prevent_cache_on_url(
url=stream_data.get("thumbnail_url"), url=stream_data.get("thumbnail_url"),
) ),
) )
def get_vod(self, user_id: str, is_retry: bool = False) -> str | None: def get_vod(self, user_id: str, is_retry: bool = False) -> str | None: