From 6d268694c3a90da0d2aaed88e643127b66b78d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 16 Jan 2022 02:15:18 +0200 Subject: [PATCH] Remove old (python<3.0) super constructor syntax --- tests/conftest.py | 2 +- trakt/calendar.py | 2 +- trakt/movies.py | 2 +- trakt/people.py | 2 +- trakt/sync.py | 2 +- trakt/tv.py | 6 +++--- trakt/users.py | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 16129eeb..ef1770de 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -27,7 +27,7 @@ class MockCore(trakt.core.Core): def __init__(self, *args, **kwargs): - super(MockCore, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.mock_data = {} for mock_file in MOCK_DATA_FILES: with open(mock_file, encoding='utf-8') as f: diff --git a/trakt/calendar.py b/trakt/calendar.py index 5fdae2d0..d5a5980e 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 fd5f15cf..cebdea20 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 074dfdb5..0d6827d4 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 c4bf7cfe..9ea717be 100644 --- a/trakt/sync.py +++ b/trakt/sync.py @@ -448,7 +448,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 9c60d9f1..bf18acfa 100644 --- a/trakt/tv.py +++ b/trakt/tv.py @@ -199,7 +199,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 @@ -503,7 +503,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) @@ -643,7 +643,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 523b83d3..15237db4 100644 --- a/trakt/users.py +++ b/trakt/users.py @@ -69,7 +69,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): @@ -203,7 +203,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