From 932758707fd8ae96bd88746fff17d84bf4a39754 Mon Sep 17 00:00:00 2001 From: Elyse <26639800+elyse0@users.noreply.github.com> Date: Thu, 9 Mar 2023 18:51:10 -0600 Subject: [PATCH] Fix linter --- yt_dlp/YoutubeDL.py | 3 +-- yt_dlp/utils.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 322f05baa..72b6f2e6e 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -3148,8 +3148,7 @@ def existing_video_file(*filepaths): fd, success = None, True if info_dict.get('protocol') or info_dict.get('url'): fd = get_suitable_downloader(info_dict, self.params, to_stdout=temp_filename == '-') - if not(fd is FFmpegFD or fd is DashSegmentsFD) and 'no-direct-merge' not in self.params['compat_opts'] and ( - info_dict.get('section_start') or info_dict.get('section_end')): + if not (fd is FFmpegFD or fd is DashSegmentsFD) and 'no-direct-merge' not in self.params['compat_opts'] and (info_dict.get('section_start') or info_dict.get('section_end')): msg = ('This format cannot be partially downloaded' if FFmpegFD.available() else 'You have requested downloading the video partially, but ffmpeg is not installed') self.report_error(f'{msg}. Aborting') diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 7dfc1d6dc..ed7516967 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -1869,7 +1869,7 @@ def unified_timestamp(date_str, day_first=True, with_milliseconds=False): for expression in date_formats(day_first): with contextlib.suppress(ValueError): dt = datetime.datetime.strptime(date_str, expression) - timezone + datetime.timedelta(hours=pm_delta) - return calendar.timegm(dt.timetuple()) + (dt.microsecond/1e6 if with_milliseconds else 0) + return calendar.timegm(dt.timetuple()) + (dt.microsecond / 1e6 if with_milliseconds else 0) timetuple = email.utils.parsedate_tz(date_str) if timetuple: