mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
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>
This commit is contained in:
parent
0bce28cd30
commit
cb6cf4b631
@ -1,5 +1,5 @@
|
|||||||
import json
|
import json
|
||||||
from typing import Any, Dict
|
from typing import Any
|
||||||
|
|
||||||
from langchain_core.load.serializable import Serializable, to_json_not_implemented
|
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)
|
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.
|
"""Return a dict representation of an object.
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
|
Loading…
Reference in New Issue
Block a user