From f2d57fcb232cc52a6165edc863f68d87b6c7439a Mon Sep 17 00:00:00 2001 From: Roland Date: Thu, 19 May 2022 21:38:55 -0600 Subject: [PATCH] Reformatting. --- modules/videos/downloader.py | 3 +-- modules/videos/lib.py | 2 +- wrolpi/common.py | 8 ++------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/modules/videos/downloader.py b/modules/videos/downloader.py index 48a8d895..52ecc6b2 100755 --- a/modules/videos/downloader.py +++ b/modules/videos/downloader.py @@ -20,8 +20,7 @@ from wrolpi.downloader import Downloader, Download, DOWNLOAD_MANAGER_CONFIG, Dow from wrolpi.errors import UnknownChannel, ChannelURLEmpty, UnrecoverableDownloadError from wrolpi.vars import PYTEST from .channel.lib import create_channel, get_channel -from .common import apply_info_json, get_no_channel_directory, \ - get_videos_directory +from .common import apply_info_json, get_no_channel_directory, get_videos_directory from .lib import upsert_video, refresh_channel_videos, get_downloader_config, get_channel_source_id from .models import Video, Channel from .schema import ChannelPostRequest diff --git a/modules/videos/lib.py b/modules/videos/lib.py index 651b9b86..9bb62b4b 100644 --- a/modules/videos/lib.py +++ b/modules/videos/lib.py @@ -449,7 +449,7 @@ VIDEO_DOWNLOADER_CONFIG: VideoDownloaderConfig = VideoDownloaderConfig(global_=T TEST_VIDEO_DOWNLOADER_CONFIG: VideoDownloaderConfig = None -def get_downloader_config(): +def get_downloader_config() -> VideoDownloaderConfig: global TEST_VIDEO_DOWNLOADER_CONFIG if isinstance(TEST_VIDEO_DOWNLOADER_CONFIG, VideoDownloaderConfig): return TEST_VIDEO_DOWNLOADER_CONFIG diff --git a/wrolpi/common.py b/wrolpi/common.py index b5d529bb..9584eb8c 100644 --- a/wrolpi/common.py +++ b/wrolpi/common.py @@ -240,17 +240,13 @@ class ConfigFile: return CONFIG_DIR / self.file_name def update(self, config: dict): - """ - Update any values of this config. Save the config to its file. - """ + """Update any values of this config. Save the config to its file.""" config = {k: v for k, v in config.items() if k in self._config} self._config.update(config) self.save() def dict(self): - """ - Get a deepcopy of this config. - """ + """Get a deepcopy of this config.""" if not hasattr(self, '_config'): raise NotImplementedError('You cannot use a global config while testing!')