Files
Projektarbeit-MYP/backend/utils/fix_indentation.py

29 lines
830 B
Python

#!/usr/bin/env python3.11
"""
Skript zur Behebung von Einrückungsproblemen in user_management.py
"""
def fix_indentation():
file_path = 'blueprints/user_management.py'
with open(file_path, 'r') as f:
content = f.read()
lines = content.split('\n')
fixed_lines = []
for line in lines:
# Behebe die falsche Einrückung nach 'with get_cached_session() as session:'
if line.startswith(' ') and not line.strip().startswith('#'):
# 7 Leerzeichen entfernen (von 15 auf 8)
fixed_lines.append(' ' + line[15:])
else:
fixed_lines.append(line)
with open(file_path, 'w') as f:
f.write('\n'.join(fixed_lines))
print('✅ Einrückung behoben')
if __name__ == "__main__":
fix_indentation()