Skip to content

Commit 5e3688b

Browse files
committed
Address code review style feedback
1 parent 4412ec5 commit 5e3688b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

dash/_utils.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import secrets
1212
import string
1313
from html import escape
14-
from functools import wraps, reduce
14+
from functools import wraps
1515
from typing import Union
1616
from dash.types import RendererHooks
1717

@@ -274,10 +274,6 @@ def clean_property_name(name: str):
274274
def hooks_to_js_object(hooks: Union[RendererHooks, None]) -> str:
275275
if hooks is None:
276276
return ""
277-
hook_str = reduce(
278-
lambda reduced, hook: f"{reduced}{hook[0]}: {hook[1]},",
279-
hooks.items(),
280-
"",
281-
)
277+
hook_str = ",".join(f"{key}: {val}" for key, val in hooks.items())
282278

283279
return f"{{{hook_str}}}"

0 commit comments

Comments
 (0)