Remove json_serial as it is in json.py instead

This commit is contained in:
tcely 2025-05-20 04:25:47 -04:00 committed by GitHub
parent e46beb39c6
commit 3aa5ec9aae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -223,14 +223,6 @@ def clean_emoji(s):
return emoji.replace_emoji(s)
def json_serial(obj):
if isinstance(obj, datetime):
return obj.isoformat()
if isinstance(obj, LazyList):
return list(obj)
raise TypeError(f'Type {type(obj)} is not json_serial()-able')
def seconds_to_timestr(seconds):
seconds = seconds % (24 * 3600)
hour = seconds // 3600