diff options
| author | 2024-06-22 21:19:36 -0400 | |
|---|---|---|
| committer | 2024-06-22 21:19:36 -0400 | |
| commit | 80e39a8fc7de105510cbbdca8507f2a4b8c9e01d (patch) | |
| tree | bb5caa2f5fafc5116b8f89e659085ffbd8a918f2 /gallery_dl/util.py | |
| parent | 1c28712d865e30ed752988ba0b6944882250b665 (diff) | |
New upstream version 1.27.1.upstream/1.27.1
Diffstat (limited to 'gallery_dl/util.py')
| -rw-r--r-- | gallery_dl/util.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gallery_dl/util.py b/gallery_dl/util.py index 861ec7e..e76ddf3 100644 --- a/gallery_dl/util.py +++ b/gallery_dl/util.py @@ -106,12 +106,12 @@ def identity(x): return x -def true(_): +def true(_, __=None): """Always returns True""" return True -def false(_): +def false(_, __=None): """Always returns False""" return False @@ -540,11 +540,22 @@ class CustomNone(): def __bool__(): return False + __lt__ = true + __le__ = true + __eq__ = false + __ne__ = true + __gt__ = false + __ge__ = false + @staticmethod def __len__(): return 0 @staticmethod + def __hash__(): + return 0 + + @staticmethod def __format__(_): return "None" |
