diff --git a/kombu/utils/json.py b/kombu/utils/json.py index 22f6a3ad2..e586b2aeb 100644 --- a/kombu/utils/json.py +++ b/kombu/utils/json.py @@ -128,6 +128,7 @@ def register_type( """ _register_type(t, marker, encoder, decoder, is_default_encoder=False) + def _register_type( t: type[T], marker: str | None, @@ -149,7 +150,7 @@ def _register_default_types(): # NOTE: datetime should be registered before date, # because datetime is also instance of date. _register_type(datetime, "datetime", datetime.isoformat, - datetime.fromisoformat) + datetime.fromisoformat) _register_type( date, "date",