Files
manual_slop/check_indent.py
T

21 lines
485 B
Python

import sys
def check_indent(file_path):
with open(file_path, 'r', encoding='utf-8') as f:
lines = f.readlines()
last_indent = 0
for i, line in enumerate(lines):
stripped = line.lstrip()
if not stripped:
continue
indent = len(line) - len(line.lstrip())
if indent > last_indent + 1:
print(f"Jump at line {i+1}: '{line.rstrip()}' (Indent: {indent}, Last: {last_indent})")
last_indent = indent
if __name__ == '__main__':
check_indent('src/app_controller.py')