Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kutu-dev committed Sep 17, 2023
1 parent d00a3a4 commit b6ef825
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/knuckles/models/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from dateutil import parser


class ArtistInfo:
"""Representation of all the data related to an artist info in Subsonic."""

Expand All @@ -23,7 +24,7 @@ def __init__(
smallImageUrl: str | None,
mediumImageUrl: str | None,
largeImageUrl: str | None,
similarArtist: list[dict[str, Any]] | None = None
similarArtist: list[dict[str, Any]] | None = None,
) -> None:
"""Representation of all the data related to an album info in Subsonic.
:param subsonic: The subsonic object to make all the internal requests with it.
Expand Down Expand Up @@ -52,9 +53,11 @@ def __init__(
self.small_image_url = smallImageUrl
self.medium_image_url = mediumImageUrl
self.large_image_url = largeImageUrl
self.similar_artists = [
Artist(self.__subsonic, **artist) for artist in similarArtist
]
self.similar_artists = (
[Artist(self.__subsonic, **artist) for artist in similarArtist]
if similarArtist
else None
)

def generate(self) -> "ArtistInfo":
"""Return a new artist info with all the data updated from the API,
Expand All @@ -69,6 +72,7 @@ def generate(self) -> "ArtistInfo":

return self.__subsonic.browsing.get_artist_info(self.artist_id)


class Artist:
"""Representation of all the data related to an artist in Subsonic."""

Expand Down

0 comments on commit b6ef825

Please sign in to comment.