Skip to content

Commit 86ac39e

Browse files
authored
refactor(core): Minor refactor for code readability (#33674)
1 parent 6e036d3 commit 86ac39e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

libs/core/langchain_core/utils/strings.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ def stringify_dict(data: dict) -> str:
3030
Returns:
3131
The stringified dictionary.
3232
"""
33-
text = ""
34-
for key, value in data.items():
35-
text += key + ": " + stringify_value(value) + "\n"
36-
return text
33+
return "".join(f"{key}: {stringify_value(value)}\n" for key, value in data.items())
3734

3835

3936
def comma_list(items: list[Any]) -> str:

0 commit comments

Comments
 (0)