INNER CODE UNIT · Python
process
Cooler2/ApusGameEngine · tools/normalize_indent.py:330
def process(paths, dry_run, flag_above, verbose=True):
stats = {'converted': 0, 'skipped_two': 0, 'skipped_mixed': 0,
'skipped_tabs': 0, 'errors': 0}
all_flagged = []
mixed_files = []
for path in sorted(paths):
try:
bom, crlf, lines = read_file(path)
except Exception as e:
print(f' ERROR reading {path}: {e}')
stats['errors'] += 1
continue
# Skip files with tabs (can't reliably handle)
if any(l.startswith('\t') for l in lines):
if verbose:
print(f' SKIP (has tabs): {path}')