aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r--yt_dlp/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index 9ff096433..19c140483 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -6057,14 +6057,16 @@ class classproperty:
class function_with_repr:
- def __init__(self, func):
+ def __init__(self, func, repr_=None):
functools.update_wrapper(self, func)
- self.func = func
+ self.func, self.__repr = func, repr_
def __call__(self, *args, **kwargs):
return self.func(*args, **kwargs)
def __repr__(self):
+ if self.__repr:
+ return self.__repr
return f'{self.func.__module__}.{self.func.__qualname__}'