From 6f731ae3f6101f21490081726913da11214708f4 Mon Sep 17 00:00:00 2001 From: Ian Schwartz <168640+studiozeroseven@users.noreply.github.com> Date: Tue, 23 Jun 2026 12:04:43 -0400 Subject: [PATCH] style: fix flake8 E501 line-too-long violations CI lint job failed on PR #1187: - test_add_channel_playlists.py: 3 docstrings over 79 chars - yt_dlp_handler.py: refresh_playlist print() string Reformat both files to comply with pre-commit-config.yaml (--line-length=79 for black/isort/flake8). All 3 unit tests in test_add_channel_playlists.py still pass. Signed-off-by: Ian Schwartz Signed-off-by: Ian Schwartz <168640+studiozeroseven@users.noreply.github.com> --- backend/download/src/yt_dlp_handler.py | 4 +++- .../tests/test_src/test_add_channel_playlists.py | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/backend/download/src/yt_dlp_handler.py b/backend/download/src/yt_dlp_handler.py index baee616b..44d98205 100644 --- a/backend/download/src/yt_dlp_handler.py +++ b/backend/download/src/yt_dlp_handler.py @@ -429,7 +429,9 @@ class DownloadPostProcess(DownloaderBase): channel = YoutubeChannel(channel_id) channel.get_from_es() if not channel.json_data: - print(f"{channel_id}: skip deleted channel for playlist refresh") + print( + f"{channel_id}: skip deleted channel for playlist refresh" + ) continue overwrites = channel.get_overwrites() diff --git a/backend/download/tests/test_src/test_add_channel_playlists.py b/backend/download/tests/test_src/test_add_channel_playlists.py index 170aee7f..b3fbb72c 100644 --- a/backend/download/tests/test_src/test_add_channel_playlists.py +++ b/backend/download/tests/test_src/test_add_channel_playlists.py @@ -7,7 +7,7 @@ from download.src.yt_dlp_handler import DownloadPostProcess class FakeChannelQueue: - """minimal queue stand-in returning a fixed sequence of (channel_id, idx) pairs""" + """minimal queue stand-in returning (channel_id, idx) pairs in order""" def __init__(self, items): self._items = list(items) @@ -34,7 +34,7 @@ class FakePlaylistQueue: @pytest.fixture def handler(): - """DownloadPostProcess with __init__ bypassed — _add_channel_playlists doesn't touch config or task""" + """handler with __init__ bypassed; doesn't touch config or task""" instance = DownloadPostProcess.__new__(DownloadPostProcess) instance.task = None @@ -42,7 +42,7 @@ def handler(): def test_skips_channel_when_json_data_missing(handler, capsys): - """regression for #1103: channel deleted from ES must not raise AttributeError""" + """#1103 regression: deleted ES channel must not raise AttributeError""" channel_id = "UCdeleted-channel-1" fake_channel_q = FakeChannelQueue([(channel_id, 0)]) @@ -88,7 +88,10 @@ def test_processes_channel_with_playlists_enabled(handler): class FakeLiveChannel: youtube_id = channel_id json_data = {"channel_overwrites": {"index_playlists": True}} - all_playlists = [("PLplaylistA", "Playlist A"), ("PLplaylistB", "Playlist B")] + all_playlists = [ + ("PLplaylistA", "Playlist A"), + ("PLplaylistB", "Playlist B"), + ] def get_from_es(self): pass