Skip to content

Commit e4e1cf2

Browse files
committed
remove useless legacy code
1 parent ab1129c commit e4e1cf2

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

fprettify/__init__.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -546,17 +546,14 @@ def inspect_ffile_format(infile, indent_size, orig_filename=None):
546546
This is mainly for finding aligned blocks of DO/IF statements.
547547
Also check if it has f77 constructs.
548548
:param infile: open file
549-
:param indent_size: the default indent size, if <= 0,
550-
adopt original indents
549+
:param indent_size: the default indent size
551550
:orig_filename: filename used for messages
552551
:returns: [ target indent sizes for each line,
553552
indent of first line (offset) ]
554553
"""
555554
if not orig_filename:
556555
orig_filename = infile.name
557556

558-
adopt = indent_size <= 0
559-
560557
num_labels = False
561558
indents = []
562559
stream = InputStream(infile, orig_filename)
@@ -575,10 +572,9 @@ def inspect_ffile_format(infile, indent_size, orig_filename=None):
575572
first_indent = offset
576573
indents.append(offset - prev_offset)
577574

578-
# do not adopt indentations but impose fixed rel. ind.
579-
# but don't impose indentation for blocked do/if constructs:
580-
if not adopt and (prev_offset != offset or (not IF_RE.search(f_line) and
581-
not DO_RE.search(f_line))):
575+
# don't impose indentation for blocked do/if constructs:
576+
if (prev_offset != offset or (not IF_RE.search(f_line) and
577+
not DO_RE.search(f_line))):
582578
indents[-1] = indent_size
583579
prev_offset = offset
584580

0 commit comments

Comments
 (0)