describe_difference: Limit string field diff length

This commit is contained in:
rubenwardy 2023-05-12 00:20:38 +01:00
parent 19fa91d319
commit 9738a8a826

@ -109,9 +109,10 @@ def describe_difference(diff: List, available_space: int) -> typing.Optional[str
after = diff[0]["after"]
if isinstance(before, str) and isinstance(after, str):
if len(before) + len(after) <= available_space + 30:
return f"{key}: {before} -> {after}"
if isinstance(before, list) and isinstance(after, list):
elif isinstance(before, list) and isinstance(after, list):
removed = []
added = []
for x in before: