fix: Remove unused variables and fix whitespace in clean_metadata.py

This commit is contained in:
Paul Gauthier (aider) 2025-04-20 11:05:56 -07:00
parent ebfce5b0f2
commit 48ac1de8d3

View file

@ -23,10 +23,8 @@ def find_block_lines(lines, key_to_remove):
if start_line_idx == -1:
# Key might not start with '{' on the same line, check if it starts immediately after
key_pattern_no_brace = re.compile(r'^\s*"' + re.escape(key_to_remove) + r'"\s*:\s*$')
potential_start = -1
for i, line in enumerate(lines):
if key_pattern_no_brace.match(line.strip()):
potential_start = i
# Look for the opening brace on the next non-empty/comment line
j = i + 1
while j < len(lines):
@ -51,7 +49,6 @@ def find_block_lines(lines, key_to_remove):
brace_level = 0
in_string = False
escape_next = False
block_started = False
end_line_idx = -1