From e4aa9a5241715c23be692144a2fa4554d412b16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 24 Oct 2022 22:49:03 +0300 Subject: [PATCH] Fix super() call for python3 Use simplified super for python3: - https://docs.quantifiedcode.com/python-anti-patterns/correctness/bad_first_argument_given_to_super.html --- trakt/calendar.py | 2 +- trakt/movies.py | 2 +- trakt/people.py | 2 +- trakt/sync.py | 2 +- trakt/tv.py | 6 +++--- trakt/users.py | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/trakt/calendar.py b/trakt/calendar.py index 5fdae2d..d5a5980 100644 --- a/trakt/calendar.py +++ b/trakt/calendar.py @@ -26,7 +26,7 @@ def __init__(self, date=None, days=7, extended=None): :param days: Number of days for this :class:`Calendar`. Defaults to 7 days """ - super(Calendar, self).__init__() + super().__init__() self.date = date or now() self.days = days self._calendar = [] diff --git a/trakt/movies.py b/trakt/movies.py index fd5f15c..cebdea2 100644 --- a/trakt/movies.py +++ b/trakt/movies.py @@ -84,7 +84,7 @@ def updated_movies(timestamp=None): class Movie(object): """A Class representing a Movie object""" def __init__(self, title, year=None, slug=None, **kwargs): - super(Movie, self).__init__() + super().__init__() self.media_type = 'movies' self.title = title self.year = int(year) if year is not None else year diff --git a/trakt/people.py b/trakt/people.py index 074dfdb..0d6827d 100644 --- a/trakt/people.py +++ b/trakt/people.py @@ -12,7 +12,7 @@ class Person(object): """A Class representing a trakt.tv Person such as an Actor or Director""" def __init__(self, name, slug=None, **kwargs): - super(Person, self).__init__() + super().__init__() self.name = name self.biography = self.birthplace = self.tmdb_id = self.birthday = None self.job = self.character = self._images = self._movie_credits = None diff --git a/trakt/sync.py b/trakt/sync.py index 9f55987..75a9ed6 100644 --- a/trakt/sync.py +++ b/trakt/sync.py @@ -451,7 +451,7 @@ def __init__(self, media, progress, app_version, app_date): :param app_version: The media center application version :param app_date: The date that *app_version* was released """ - super(Scrobbler, self).__init__() + super().__init__() self.progress, self.version = progress, app_version self.media, self.date = media, app_date if self.progress > 0: diff --git a/trakt/tv.py b/trakt/tv.py index e41bf4f..5f9cbf8 100644 --- a/trakt/tv.py +++ b/trakt/tv.py @@ -201,7 +201,7 @@ class TVShow(object): """A Class representing a TV Show object.""" def __init__(self, title='', slug=None, **kwargs): - super(TVShow, self).__init__() + super().__init__() self.media_type = 'shows' self.top_watchers = self.top_episodes = self.year = self.tvdb = None self.imdb = self.genres = self.certification = self.network = None @@ -563,7 +563,7 @@ class TVSeason(object): """Container for TV Seasons""" def __init__(self, show, season=1, slug=None, **kwargs): - super(TVSeason, self).__init__() + super().__init__() self.show = show self.season = season self.slug = slug or slugify(show) @@ -703,7 +703,7 @@ class TVEpisode(object): """Container for TV Episodes""" def __init__(self, show, season, number=-1, **kwargs): - super(TVEpisode, self).__init__() + super().__init__() self.media_type = 'episodes' self.show = show self.season = season diff --git a/trakt/users.py b/trakt/users.py index ff59633..05b3047 100644 --- a/trakt/users.py +++ b/trakt/users.py @@ -70,7 +70,7 @@ class UserList(namedtuple('UserList', ['name', 'description', 'privacy', """A list created by a Trakt.tv :class:`User`""" def __init__(self, *args, **kwargs): - super(UserList, self).__init__() + super().__init__() self._items = list() def __iter__(self, *args, **kwargs): @@ -204,7 +204,7 @@ def unlike(self): class User(object): """A Trakt.tv User""" def __init__(self, username, **kwargs): - super(User, self).__init__() + super().__init__() self.username = username self._calendar = self._last_activity = self._watching = None self._movies = self._movie_collection = self._movies_watched = None