File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -7,26 +7,29 @@ def format_plain(diff, path=""):
77
88 if status == "added" :
99 formatted_value = format_value (value ["value" ])
10- lines .append (f"Property '{ property_path } ' was added with value: { formatted_value } " )
10+ lines .append (
11+ f"Property '{ property_path } ' "
12+ f"was added with value: { formatted_value } "
13+ )
1114
1215 elif status == "removed" :
1316 lines .append (f"Property '{ property_path } ' was removed" )
14-
1517 elif status == "modified" :
1618 old_value = format_value (value ["old_value" ])
1719 new_value = format_value (value ["new_value" ])
1820 lines .append (
19- f"Property '{ property_path } ' was updated. From { old_value } to { new_value } "
21+ f"Property '{ property_path } ' was updated. "
22+ f"From { old_value } to { new_value } "
2023 )
21-
2224 elif status == "nested" :
23- lines .extend (format_plain (value ["children" ], property_path ).split ('\n ' ))
25+ lines .extend (
26+ format_plain (value ["children" ], property_path ).split ('\n ' )
27+ )
2428
2529 return "\n " .join (lines )
2630
2731
2832def format_value (value ):
29- """Форматирует значение для plain-вывода."""
3033 if isinstance (value , dict ):
3134 return "[complex value]"
3235 if isinstance (value , bool ):
@@ -35,4 +38,4 @@ def format_value(value):
3538 return "null"
3639 if isinstance (value , str ):
3740 return f"'{ value } '"
38- return str (value )
41+ return str (value )
You can’t perform that action at this time.
0 commit comments