diff --git a/pylast/__init__.py b/pylast/__init__.py index f8d9a16..daa1efe 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -602,7 +602,7 @@ class _Network(object): return Track(_extract(doc, "name", 1), _extract(doc, "name"), self) def get_artist_by_mbid(self, mbid): - """Loooks up an artist by its MusicBrainz ID""" + """Looks up an artist by its MusicBrainz ID""" params = {"mbid": mbid} @@ -1199,9 +1199,9 @@ Shout = collections.namedtuple( "Shout", ["body", "author", "date"]) -def _string_output(funct): +def _string_output(func): def r(*args): - return _string(funct(*args)) + return _string(func(*args)) return r @@ -1304,20 +1304,20 @@ class _BaseObject(object): """ # Last.fm currently accepts a max of 10 recipient at a time - while(len(users) > 10): + while len(users) > 10: section = users[0:9] users = users[9:] self.share(section, message) - nusers = [] + user_names = [] for user in users: if isinstance(user, User): - nusers.append(user.get_name()) + user_names.append(user.get_name()) else: - nusers.append(user) + user_names.append(user) params = self._get_params() - recipients = ','.join(nusers) + recipients = ','.join(user_names) params['recipient'] = recipients if message: params['message'] = message @@ -2830,7 +2830,7 @@ class Tag(_BaseObject, _Chartable): return seq def get_top_albums(self, limit=None, cacheable=True): - """Retuns a list of the top albums.""" + """Returns a list of the top albums.""" params = self._get_params() if limit: params['limit'] = limit @@ -2924,7 +2924,7 @@ class Track(_Opus): return _extract(doc, "streamable") == "1" def is_fulltrack_available(self): - """Returns True if the fulltrack is available for streaming.""" + """Returns True if the full track is available for streaming.""" doc = self._request(self.ws_prefix + ".getInfo", True) return doc.getElementsByTagName( @@ -4152,14 +4152,14 @@ def _unescape_htmlentity(string): return string -def extract_items(topitems_or_libraryitems): +def extract_items(top_items_or_library_items): """ Extracts a sequence of items from a sequence of TopItem or LibraryItem objects. """ seq = [] - for i in topitems_or_libraryitems: + for i in top_items_or_library_items: seq.append(i.item) return seq