Skip to content

Commit

Permalink
fix: make it possible to both --disable-whitespace and enable intrins…
Browse files Browse the repository at this point in the history
…ic case formatting
  • Loading branch information
stigh committed Feb 28, 2024
1 parent 98b41c3 commit ab7d550
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions fprettify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab7d550

Please sign in to comment.