AI_Resume_helper / find_error.py
kedar-bhumkar's picture
Upload 19 files
36652ef verified
raw
history blame contribute delete
587 Bytes
import re
def find_problematic_fstrings(file_path):
with open(file_path, 'r', encoding='utf-8') as file:
lines = file.readlines()
for i, line in enumerate(lines):
# Look for f-strings with backslashes
if 'f"' in line or "f'" in line:
# Check if there's a backslash in the f-string
match = re.search(r'f["\'].*?\\.*?["\']', line)
if match:
print(f"Potential problematic f-string at line {i+1}: {line.strip()}")
if __name__ == "__main__":
find_problematic_fstrings("backend.py")