1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-13 04:55:13 +00:00

[cleanup] Misc (#14767)

Authored by: bashonly, sepro, matyb08

Co-authored-by: sepro <sepro@sepr0.com>
Co-authored-by: matyb08 <suricate66@protonmail.com>
This commit is contained in:
bashonly
2025-11-09 08:07:10 -06:00
committed by GitHub
parent f3c255b63b
commit c63b4e2a2b
4 changed files with 42 additions and 22 deletions

4
devscripts/update_ejs.py Normal file → Executable file
View File

@@ -66,7 +66,9 @@ def list_wheel_contents(
) -> str:
assert folders or files, 'at least one of "folders" or "files" must be True'
path_gen = (zinfo.filename for zinfo in zipfile.ZipFile(io.BytesIO(wheel_data)).infolist())
with zipfile.ZipFile(io.BytesIO(wheel_data)) as zipf:
path_gen = (zinfo.filename for zinfo in zipf.infolist())
filtered = filter(lambda path: path.startswith('yt_dlp_ejs/'), path_gen)
if suffix:
filtered = filter(lambda path: path.endswith(f'.{suffix}'), filtered)