Files
tianxuan/scripts/fix_merge_conflict.py
T

12 lines
497 B
Python

"""Fix the unresolved merge conflict in views/clustering.py."""
import re
with open('analysis/views/clustering.py', 'r', encoding='utf-8-sig') as f:
lines = f.readlines()
# Find and remove lines containing conflict markers
new_lines = [l for l in lines if '<<<<<<<' not in l and '>>>>>>>' not in l and '=======' not in l]
with open('analysis/views/clustering.py', 'w', encoding='utf-8') as f:
f.writelines(new_lines)
print(f'Removed {len(lines) - len(new_lines)} conflict marker lines')