From 13661e529d61e378c5f44e0901d0e2e7a0c130c3 Mon Sep 17 00:00:00 2001 From: DSungatulin Date: Wed, 21 Feb 2024 01:22:54 +0600 Subject: [PATCH] error correction --- gendiff/formatters/stylish.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gendiff/formatters/stylish.py b/gendiff/formatters/stylish.py index 5442259..4deebd0 100644 --- a/gendiff/formatters/stylish.py +++ b/gendiff/formatters/stylish.py @@ -18,7 +18,7 @@ def walk(dict_, output, depth, indent): else: output.append(beginning + get_data_format(value)) return ( - '{\n' + '\n'.join(output) + f'\n{indent + (INDENT_CHAR*INDENT_NUMBER)[0:-LEFTWARD_SHIFT]}' + '}' #noqa: E226 + '{\n' + '\n'.join(output) + f'\n{indent + (INDENT_CHAR*INDENT_NUMBER)[0:-LEFTWARD_SHIFT]}' + '}' # noqa: E226 ) if isinstance(value, dict): @@ -46,7 +46,7 @@ def form_string(key, action, old_value, new_value, depth, indent): def get_stylished(diff): def walk(diff, output, depth): - indent = ((INDENT_CHAR * INDENT_NUMBER) * depth)[0:-LEFTWARD_SHIFT] #noqa: E226 + indent = ((INDENT_CHAR * INDENT_NUMBER) * depth)[0:-LEFTWARD_SHIFT] # noqa: E226 for entry in diff: key = entry['key'] nested = entry.get('nested') @@ -54,7 +54,7 @@ def walk(diff, output, depth): if nested: output.append(indent + special_char + key + ': {') walk(nested, output, depth + 1) - output.append(indent + (INDENT_CHAR * INDENT_NUMBER)[0:-LEFTWARD_SHIFT] + '}') #noqa: E226 + output.append(indent + (INDENT_CHAR * INDENT_NUMBER)[0:-LEFTWARD_SHIFT] + '}') # noqa: E226 else: action = entry['action'] old_value = entry['old value']