my.core.serialize: formatting fixes
This commit is contained in:
parent
c3f3650bcc
commit
70b541280a
1 changed files with 0 additions and 2 deletions
|
@ -25,7 +25,6 @@ def _default_encode(obj: Any) -> Any:
|
|||
return obj._asdict()
|
||||
if isinstance(obj, datetime.timedelta):
|
||||
return obj.total_seconds()
|
||||
|
||||
if isinstance(obj, Exception):
|
||||
return error_to_json(obj)
|
||||
# note: _serialize would only be called for items which aren't already
|
||||
|
@ -142,7 +141,6 @@ def test_default_serializer() -> None:
|
|||
import pytest
|
||||
import json as jsn # dont cause possible conflicts with module code
|
||||
|
||||
|
||||
class Unserializable:
|
||||
def __init__(self, x: int):
|
||||
self.x = x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue