Open GaelGil opened 3 years ago
Is there some data inside the function that's manipulated/modified/created and could be returned? For instance, in create_spotify_playlist_from_search
you might return a list of songs.
In fact, you might even want to break up this function into two functions: one that does your data manipulation and can be easily tested locally, and another that is a very small function that calls the API and can easily be mocked out.
I have some functions in my class
CreateSpotifyPlaylist
. Some functions have no returns for example:def add_tracks_to_playlist(self, playlist_id: str) -> None:
. What should the return statement be at the end of the function. Usingreturn
andreturn None
gives me the issueUseless return at end of function or method (useless-return)
when I use pylint. What would be an appropriate return?