Fix return value type of dumpd (#20123)

The return type of `json.loads` is `Any`.

In fact, the return type of `dumpd` must be based on `json.loads`, so
the correction here is understandable.

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
pull/23228/head
ChrisDEV 2 months ago committed by GitHub
parent 0bce28cd30
commit cb6cf4b631
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,5 +1,5 @@
import json
from typing import Any, Dict
from typing import Any
from langchain_core.load.serializable import Serializable, to_json_not_implemented
@ -41,7 +41,7 @@ def dumps(obj: Any, *, pretty: bool = False, **kwargs: Any) -> str:
return json.dumps(to_json_not_implemented(obj), **kwargs)
def dumpd(obj: Any) -> Dict[str, Any]:
def dumpd(obj: Any) -> Any:
"""Return a dict representation of an object.
Note:

Loading…
Cancel
Save