fixed faulty type hint and old function

This commit is contained in:
Hellow2 2023-03-27 16:20:16 +02:00
parent 6b2d2e0bfc
commit 2ff58d3a30
3 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ class Page:
@classmethod
def get_request(cls, url: str, accepted_response_codes: set = set((200,)), trie: int = 0) -> Optional[
requests.Request]:
requests.Response]:
try:
r = cls.API_SESSION.get(url, timeout=cls.TIMEOUT)
except requests.exceptions.Timeout:
@ -53,7 +53,7 @@ class Page:
@classmethod
def post_request(cls, url: str, json: dict, accepted_response_codes: set = set((200,)), trie: int = 0) -> Optional[
requests.Request]:
requests.Response]:
try:
r = cls.API_SESSION.post(url, json=json, timeout=cls.TIMEOUT)
except requests.exceptions.Timeout:

View File

@ -257,13 +257,13 @@ class Musify(Page):
else:
LOGGER.warning("got an unequal ammount than 3 small elements")
return cls.ALBUM_CACHE.append(Album(
return Album(
_id=_id,
title=title,
source_list=source_list,
date=ID3Timestamp(year=year),
artist_list=artist_list
))
)
@classmethod
def parse_contact_container(cls, contact_container_soup: BeautifulSoup) -> List[Union[Artist, Album]]:

View File

@ -33,4 +33,4 @@ def fetch_album():
print(artist.id, artist.name)
if __name__ == "__main__":
fetch_album()
search()