Fix typos and style
This commit is contained in:
parent
9b68fb6c68
commit
93bb581842
|
@ -708,7 +708,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}
|
||||
|
||||
|
@ -1373,9 +1373,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
|
||||
|
||||
|
@ -1478,20 +1478,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
|
||||
|
@ -3004,7 +3004,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
|
||||
|
@ -4326,14 +4326,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