Fix typos and style
This commit is contained in:
parent
4c820d8565
commit
281bb7c453
|
@ -709,7 +709,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}
|
||||
|
||||
|
@ -1375,9 +1375,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
|
||||
|
||||
|
@ -1480,20 +1480,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
|
||||
|
@ -3006,7 +3006,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
|
||||
|
@ -4331,14 +4331,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
|
||||
|
|
Loading…
Reference in a new issue