Skip to content

Commit

Permalink
Use built-in function python depreciation. Apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tehkillerbee committed Apr 8, 2024
1 parent ed78f15 commit 0cc4f92
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions tidalapi/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from datetime import datetime
from enum import Enum
from typing import TYPE_CHECKING, List, Mapping, Optional, Union, cast
from warnings import warn

import dateutil.parser
from typing_extensions import NoReturn
Expand Down Expand Up @@ -126,9 +127,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
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`")
warn(
"This method is deprecated an will be removed in a future release. Use instead `get_ep_singles`",
DeprecationWarning,
stacklevel=2,
)

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

Expand All @@ -143,15 +148,17 @@ def get_ep_singles(
return self._get_albums(params)

def get_albums_other(
self, limit: Optional[int] = None, offset: int = 0
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`")
warn(
"This method is deprecated an will be removed in a future release. Use instead `get_other`",
DeprecationWarning,
stacklevel=2,
)

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

def get_other(
self, limit: Optional[int] = None, offset: int = 0
) -> List["Album"]:
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.
:return: A list of :class:`Albums <tidalapi.album.Album>`
Expand Down

0 comments on commit 0cc4f92

Please sign in to comment.