Skip to content

Commit d331321

Browse files
committed
fix: pass kwargs to core._body_to_str
1 parent edc977b commit d331321

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

string_to_code/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ def get_body_to_str(
8888
) -> typing.Callable[[core.SimpleFunction], str]:
8989
"""returns body_to_str-like function"""
9090

91-
def _body_to_str(in_function: core.SimpleFunction) -> str:
91+
def _body_to_str(in_function: core.SimpleFunction, **kwargs) -> str:
9292
if in_function.called_list:
9393
return in_separator.join(
94-
in_prefix + in_call_function_or_atom(_) + in_postfix
94+
in_prefix + in_call_function_or_atom(_, **kwargs) + in_postfix
9595
for _ in in_function.called_list
9696
)
9797
return in_empty_result
@@ -110,7 +110,7 @@ def _function_to_code(
110110
in_function_id: int, in_function: core.SimpleFunction, **kwargs
111111
) -> str:
112112
function_name = in_get_function_name(in_function_id, **kwargs)
113-
function_body = in_body_to_str(in_function)
113+
function_body = in_body_to_str(in_function, **kwargs)
114114
res = in_merge_to_full_function(function_name, function_body)
115115
assert res[-1] == "\n" # nosec B101
116116
return res

0 commit comments

Comments
 (0)