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>
This commit is contained in:
Ian Schwartz 2026-06-23 12:04:43 -04:00
parent 389d344ed9
commit 6f731ae3f6
2 changed files with 10 additions and 5 deletions

View File

@ -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()

View File

@ -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