Skip to content

Commit

Permalink
Upgrade Python syntax with pyupgrade --py3-plus
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Dec 29, 2018
1 parent 742df8b commit ee879aa
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pylast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
logging.getLogger(__name__).addHandler(logging.NullHandler())


class _Network(object):
class _Network:
"""
A music social network website such as Last.fm or
one with a Last.fm-compatible API.
Expand Down Expand Up @@ -795,7 +795,7 @@ def __repr__(self):
)


class _ShelfCacheBackend(object):
class _ShelfCacheBackend:
"""Used as a backend for caching cacheable requests."""

def __init__(self, file_path=None):
Expand All @@ -816,7 +816,7 @@ def set_xml(self, key, xml_string):
self.shelf[key] = xml_string


class _Request(object):
class _Request:
"""Representing an abstract web service operation."""

def __init__(self, network, method_name, params=None):
Expand Down Expand Up @@ -981,7 +981,7 @@ def _check_response_for_errors(self, response):
raise WSError(self.network, status, details)


class SessionKeyGenerator(object):
class SessionKeyGenerator:
"""Methods of generating a session key:
1) Web Authentication:
a. network = get_*_network(API_KEY, API_SECRET)
Expand Down Expand Up @@ -1104,7 +1104,7 @@ def r(*args):
return r


class _BaseObject(object):
class _BaseObject:
"""An abstract webservices object."""

network = None
Expand Down Expand Up @@ -1193,7 +1193,7 @@ def get_wiki(self, section):
return _extract(node, section)


class _Chartable(object):
class _Chartable:
"""Common functions for classes with charts."""

def __init__(self, ws_prefix):
Expand Down Expand Up @@ -1264,7 +1264,7 @@ def get_weekly_charts(self, chart_kind, from_date=None, to_date=None):
return seq


class _Taggable(object):
class _Taggable:
"""Common functions for classes with tags."""

def __init__(self, ws_prefix):
Expand Down Expand Up @@ -1593,7 +1593,7 @@ class Album(_Opus):
__hash__ = _Opus.__hash__

def __init__(self, artist, title, network, username=None, info=None):
super(Album, self).__init__(artist, title, network, "album", username, info)
super().__init__(artist, title, network, "album", username, info)

def get_tracks(self):
"""Returns the list of Tracks on this album."""
Expand Down Expand Up @@ -2062,7 +2062,7 @@ class Track(_Opus):
__hash__ = _Opus.__hash__

def __init__(self, artist, title, network, username=None, info=None):
super(Track, self).__init__(artist, title, network, "track", username, info)
super().__init__(artist, title, network, "track", username, info)

def get_correction(self):
"""Returns the corrected track name."""
Expand Down

0 comments on commit ee879aa

Please sign in to comment.