From ab7d5503bf1dbba0b6c6aa17f74b7767b64b64a5 Mon Sep 17 00:00:00 2001 From: Stig Helgeland Date: Wed, 28 Feb 2024 14:47:37 +0100 Subject: [PATCH] fix: make it possible to both --disable-whitespace and enable intrinsic case formatting --- fprettify/__init__.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fprettify/__init__.py b/fprettify/__init__.py index fc94fc8..0d73ee4 100644 --- a/fprettify/__init__.py +++ b/fprettify/__init__.py @@ -1573,12 +1573,11 @@ def reformat_ffile_combined(infile, outfile, impose_indent=True, indent_size=3, if impose_case: f_line = replace_keywords_single_fline(f_line, case_dict) - if impose_whitespace: - lines = format_single_fline( - f_line, whitespace, whitespace_dict, linebreak_pos, ampersand_sep, - scope_parser, format_decl, orig_filename, stream.line_nr, auto_format) + lines = format_single_fline( + f_line, whitespace, whitespace_dict, linebreak_pos, ampersand_sep, + scope_parser, format_decl, orig_filename, stream.line_nr, impose_whitespace) - lines = append_comments(lines, comment_lines, is_special) + lines = append_comments(lines, comment_lines, is_special) # target indent for next line rel_indent = req_indents[nfl] if nfl < len(req_indents) else 0