Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Removed return types from method names, but added deprecation warni… #249

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/test_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_get_albums(session):
find_ids(albums, artist.get_albums)


def test_get_albums_ep_singles(session):
def test_get_ep_singles(session):
artist = session.artist(16147)
albums = [
session.album(20903364),
Expand All @@ -71,18 +71,18 @@ def test_get_albums_ep_singles(session):
session.album(19384377),
]

find_ids(albums, artist.get_albums_ep_singles)
find_ids(albums, artist.get_ep_singles)


def test_get_albums_other(session):
def test_get_other(session):
artist = session.artist(17123)
albums = [
session.album(327452387),
session.album(322406553),
]
other_albums = artist.get_albums_other
other_albums = artist.get_other
# artist_item_ids = [item.id for item in other_albums()]
find_ids(albums, artist.get_albums_other)
find_ids(albums, artist.get_other)


def test_get_top_tracks(session):
Expand Down
14 changes: 14 additions & 0 deletions tidalapi/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ def get_albums(self, limit: Optional[int] = None, offset: int = 0) -> List["Albu
return self._get_albums(params)

def get_albums_ep_singles(
self, limit: Optional[int] = None, offset: int = 0
) -> List["Album"]:
print("This method is deprecated an will be removed in a future release. Use instead `get_ep_singles`")

return self.get_ep_singles(limit=limit, offset=offset)

def get_ep_singles(
self, limit: Optional[int] = None, offset: int = 0
) -> List["Album"]:
"""Queries TIDAL for the artists extended plays and singles.
Expand All @@ -136,6 +143,13 @@ def get_albums_ep_singles(
return self._get_albums(params)

def get_albums_other(
self, limit: Optional[int] = None, offset: int = 0
) -> List["Album"]:
print("This method is deprecated an will be removed in a future release. Use instead `get_other`")

return self.get_other(limit=limit, offset=offset)

def get_other(
self, limit: Optional[int] = None, offset: int = 0
) -> List["Album"]:
"""Queries TIDAL for albums the artist has appeared on as a featured artist.
Expand Down
Loading