From 34dfd7d5996b1b6117c2155bb95aeb377038bb6e Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Mon, 10 Jun 2024 17:05:19 +0300 Subject: Update fix_whitespace.py to handle newlines correctly --- scripts/code_tools/fix_whitespace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/code_tools/fix_whitespace.py b/scripts/code_tools/fix_whitespace.py index 91e82f26f4..7a88265479 100644 --- a/scripts/code_tools/fix_whitespace.py +++ b/scripts/code_tools/fix_whitespace.py @@ -55,7 +55,7 @@ def convert_tabs_to_spaces(file_path, tab_stop): new_lines.append(new_line + '\n') - with open(file_path, 'w') as file: + with open(file_path, 'w', newline='\n') as file: file.writelines(new_lines) def process_directory(directory, extensions, tab_stop): -- cgit v1.2.3