From 8619b400f2dc3c4fda9d1e952b1da9b05985c43a Mon Sep 17 00:00:00 2001 From: Alexander Kucera Date: Sat, 6 Jun 2026 09:32:15 +0200 Subject: [PATCH] docs(downloader): note rename_chapters param shadowing Add inline comment in _finalize_download() explaining that the rename_chapters bool param shadows the module-level rename_chapters() function. This is safe because the actual call is delegated to _rename_and_log(), which has its own clean scope. --- librofm_downloader/downloader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/librofm_downloader/downloader.py b/librofm_downloader/downloader.py index 87987be..5fe0cf9 100644 --- a/librofm_downloader/downloader.py +++ b/librofm_downloader/downloader.py @@ -325,6 +325,9 @@ def _finalize_download( branches in download_book(). Callers only need to attempt their download; on success they delegate here for everything else. """ + # Note: 'rename_chapters' param shadows the module-level rename_chapters() + # function. The actual function is called via _rename_and_log(), which has + # its own clean scope, so this is safe. # MP3-only: optionally rename chapter files if format == "mp3" and rename_chapters: _rename_and_log(result_path, mp3_tracks or [], book.title, reporter)