[utils] Fix join_nonempty, add **kwargs to unpack (#11559)

Authored by: Grub4K
This commit is contained in:
Simon Sawicki 2024-11-15 22:06:15 +01:00 committed by GitHub
parent f2a4983df7
commit 39d79c9b9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 10 deletions

View file

@ -72,7 +72,6 @@ from yt_dlp.utils import (
intlist_to_bytes,
iri_to_uri,
is_html,
join_nonempty,
js_to_json,
limit_length,
locked_file,
@ -2158,10 +2157,6 @@ Line 1
assert int_or_none(v=10) == 10, 'keyword passed positional should call function'
assert int_or_none(scale=0.1)(10) == 100, 'call after partial application should call the function'
assert callable(join_nonempty(delim=', ')), 'varargs positional should apply partially'
assert callable(join_nonempty()), 'varargs positional should apply partially'
assert join_nonempty(None, delim=', ') == '', 'passed varargs should call the function'
if __name__ == '__main__':
unittest.main()