Skip to content

Commit

Permalink
Add typing to the Page classes
Browse files Browse the repository at this point in the history
  • Loading branch information
arusahni committed Sep 4, 2023
1 parent 96c820c commit c454554
Show file tree
Hide file tree
Showing 5 changed files with 209 additions and 116 deletions.
8 changes: 8 additions & 0 deletions tidalapi/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ def get_radio(self) -> List["Track"]:
),
)

def items(self) -> list:
"""The artist page does not supply any items. This only exists for symmetry with
other model types.
:return: An empty list.
"""
return []

def image(self, dimensions: int = 320) -> str:
"""A url to an artist picture.
Expand Down
2 changes: 1 addition & 1 deletion tidalapi/mix.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Mix:
_retrieved = False
_items: Optional[List[Union["Video", "Track"]]] = None

def __init__(self, session: Session, mix_id: str):
def __init__(self, session: Session, mix_id: Optional[str]):
self.session = session
self.request = session.request
if mix_id is not None:
Expand Down
Loading

0 comments on commit c454554

Please sign in to comment.