aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/utils/_utils.py
diff options
context:
space:
mode:
authorSimon Sawicki <contact@grub4k.xyz>2024-11-02 21:42:00 +0100
committerGitHub <noreply@github.com>2024-11-02 21:42:00 +0100
commit422195ec70a00b0d2002b238cacbae7790c57fdf (patch)
tree0edaea18bb0e9b3ed8cab70fc82c7a0a09633ea2 /yt_dlp/utils/_utils.py
parenta6783a3b9905e547f6c1d4df9d7c7999feda8afa (diff)
[utils] Allow partial application for even more functions (#11437)
Fixes b6dc2c49e8793c6dfa21275e61caf49ec1148b81 Authored by: Grub4K
Diffstat (limited to 'yt_dlp/utils/_utils.py')
-rw-r--r--yt_dlp/utils/_utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py
index e30008e93..2f4c0a00f 100644
--- a/yt_dlp/utils/_utils.py
+++ b/yt_dlp/utils/_utils.py
@@ -5294,6 +5294,7 @@ def make_archive_id(ie, video_id):
return f'{ie_key.lower()} {video_id}'
+@partial_application
def truncate_string(s, left, right=0):
assert left > 3 and right >= 0
if s is None or len(s) <= left + right: