aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils/_utils.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-05-24 23:29:30 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-05-24 23:29:30 +0530
commit46f1370e9af6f8af8762f67e27e5acb8f0c48a47 (patch)
tree3248685f68fdb473ec7e4fdab9447a90e0d82cf6 /yt_dlp/utils/_utils.py
parent69a40e4a7f6caa5662527ebd2f3c4e8aa02857a2 (diff)
downloadhypervideo-pre-46f1370e9af6f8af8762f67e27e5acb8f0c48a47.tar.lz
hypervideo-pre-46f1370e9af6f8af8762f67e27e5acb8f0c48a47.tar.xz
hypervideo-pre-46f1370e9af6f8af8762f67e27e5acb8f0c48a47.zip
[devscripts/cli_to_api] Add script
Diffstat (limited to 'yt_dlp/utils/_utils.py')
-rw-r--r--yt_dlp/utils/_utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py
index 9f1a127cd..afcb2a164 100644
--- a/yt_dlp/utils/_utils.py
+++ b/yt_dlp/utils/_utils.py
@@ -60,6 +60,8 @@ from ..compat import (
from ..dependencies import brotli, certifi, websockets, xattr
from ..socks import ProxyType, sockssocket
+__name__ = __name__.rsplit('.', 1)[0] # Pretend to be the parent module
+
# This is not clearly defined otherwise
compiled_regex_type = type(re.compile(''))
@@ -1957,8 +1959,8 @@ class DateRange:
date = date_from_str(date)
return self.start <= date <= self.end
- def __str__(self):
- return f'{self.start.isoformat()} - {self.end.isoformat()}'
+ def __repr__(self):
+ return f'{__name__}.{type(self).__name__}({self.start.isoformat()!r}, {self.end.isoformat()!r})'
def __eq__(self, other):
return (isinstance(other, DateRange)