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:
4
devscripts/update_ejs.py
Normal file → Executable file
4
devscripts/update_ejs.py
Normal file → Executable 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)
|
||||
|
||||
Reference in New Issue
Block a user