Skip to content

Commit

Permalink
fix, server: use 'yield from'
Browse files Browse the repository at this point in the history
  • Loading branch information
dxstiny committed Feb 27, 2024
1 parent 318ee43 commit 47b3c9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/server/player/iPlayerPlaylist.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ def __hash__(self) -> int:
return hash(self.id)

def __iter__(self) -> Generator[Song, None, None]:
for song in self._songs:
yield song
yield from self._songs

def __len__(self) -> int:
return len(self._songs)
Expand Down
3 changes: 1 addition & 2 deletions src/server/player/playerQueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ def toDict(self) -> Dict[str, Any]:
}

def __iter__(self) -> Generator[Song, None, None]:
for song in self._songs:
yield song
yield from self._songs

def __len__(self) -> int:
return len(self._songs)
Expand Down

0 comments on commit 47b3c9a

Please sign in to comment.