1
0
Fork 0
mirror of synced 2024-10-03 19:43:10 +13:00
This commit is contained in:
OMEGARAZER 2023-01-28 23:58:36 -05:00
parent 247ea5ddd0
commit 95c8c72271
No known key found for this signature in database
GPG key ID: D89925310D306E35
8 changed files with 9 additions and 9 deletions

View file

@ -11,7 +11,7 @@ logger = logging.getLogger(__name__)
class CommentArchiveEntry(BaseArchiveEntry):
def __init__(self, comment: praw.models.Comment):
super(CommentArchiveEntry, self).__init__(comment)
super().__init__(comment)
def compile(self) -> dict:
self.source.refresh()

View file

@ -11,7 +11,7 @@ logger = logging.getLogger(__name__)
class SubmissionArchiveEntry(BaseArchiveEntry):
def __init__(self, submission: praw.models.Submission):
super(SubmissionArchiveEntry, self).__init__(submission)
super().__init__(submission)
def compile(self) -> dict:
comments = self._get_comments()

View file

@ -26,7 +26,7 @@ logger = logging.getLogger(__name__)
class Archiver(RedditConnector):
def __init__(self, args: Configuration, logging_handlers: Iterable[logging.Handler] = ()):
super(Archiver, self).__init__(args, logging_handlers)
super().__init__(args, logging_handlers)
def download(self):
for generator in self.reddit_lists:
@ -65,7 +65,7 @@ class Archiver(RedditConnector):
return [supplied_submissions]
def get_user_data(self) -> list[Iterator]:
results = super(Archiver, self).get_user_data()
results = super().get_user_data()
if self.args.user and self.args.all_comments:
sort = self.determine_sort_function()
for user in self.args.user:

View file

@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
class RedditCloner(RedditDownloader, Archiver):
def __init__(self, args: Configuration, logging_handlers: Iterable[logging.Handler] = ()):
super(RedditCloner, self).__init__(args, logging_handlers)
super().__init__(args, logging_handlers)
def download(self):
for generator in self.reddit_lists:

View file

@ -13,7 +13,7 @@ logger = logging.getLogger(__name__)
class Configuration(Namespace):
def __init__(self):
super(Configuration, self).__init__()
super().__init__()
self.authenticate = False
self.config = None
self.opts: Optional[str] = None

View file

@ -37,7 +37,7 @@ def _calc_hash(existing_file: Path):
class RedditDownloader(RedditConnector):
def __init__(self, args: Configuration, logging_handlers: Iterable[logging.Handler] = ()):
super(RedditDownloader, self).__init__(args, logging_handlers)
super().__init__(args, logging_handlers)
if self.args.search_existing:
self.master_hash_list = self.scan_existing_files(self.download_directory)

View file

@ -88,7 +88,7 @@ class OAuth2Authenticator:
class OAuth2TokenManager(praw.reddit.BaseTokenManager):
def __init__(self, config: configparser.ConfigParser, config_location: Path):
super(OAuth2TokenManager, self).__init__()
super().__init__()
self.config = config
self.config_location = config_location

View file

@ -16,7 +16,7 @@ logger = logging.getLogger(__name__)
class YtdlpFallback(BaseFallbackDownloader, Youtube):
def __init__(self, post: Submission):
super(YtdlpFallback, self).__init__(post)
super().__init__(post)
def find_resources(self, authenticator: Optional[SiteAuthenticator] = None) -> list[Resource]:
out = Resource(