Skip to content

Commit 6107068

Browse files
skrawczelijahbenizzy
authored andcommitted
Fixes PR comments
1 parent 97ba0a3 commit 6107068

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

hamilton/execution/graph_functions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def combine_config_and_inputs(config: Dict[str, Any], inputs: Dict[str, Any]) ->
9797

9898

9999
def create_input_string(kwargs: dict) -> str:
100-
"""THis is a utility function to create a string representation of the inputs to a function.
100+
"""This is a utility function to create a string representation of the inputs to a function.
101101
102102
This is useful for debugging, as it can be printed out to see what the inputs were.
103103
@@ -115,7 +115,7 @@ def create_input_string(kwargs: dict) -> str:
115115
inputs[k] = item_repr
116116
input_string = pp.pformat(inputs)
117117
if len(input_string) > 1000:
118-
input_string = input_string[:80] + "..."
118+
input_string = input_string[:1000] + "..."
119119
return input_string
120120

121121

tests/execution/test_graph_functions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ def test_create_input_string_with_empty_dict():
168168

169169
def test_create_input_string_with_large_number_of_args():
170170
"""Tests that create_input_string truncates the output if there are too many arguments"""
171-
kwargs = {f"arg{i}": i for i in range(100)}
171+
kwargs = {f"arg{i}": i for i in range(1000)}
172172
result = create_input_string(kwargs)
173173
assert result.startswith("{")
174174
assert result.endswith("...")
175-
assert len(result) == 83
175+
assert len(result) == 1003
176176

177177

178178
def test_create_input_string_with_dataframes():

0 commit comments

Comments
 (0)