From 1e1bb53ca343de8a5d3f8f4540cf432f6045fb9c Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 22 Aug 2024 08:18:54 -0700 Subject: [PATCH] fix: Correct indentation in testsr.py --- testsr.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/testsr.py b/testsr.py index 1a23a5d2f..291e3ea44 100755 --- a/testsr.py +++ b/testsr.py @@ -30,28 +30,28 @@ def process_markdown(filename): # Process the content with find_original_update_blocks try: - blocks = list(find_original_update_blocks(content, DEFAULT_FENCE)) + blocks = list(find_original_update_blocks(content, DEFAULT_FENCE)) - # Create a dictionary for this section - section_result = {"header": header, "blocks": []} + # Create a dictionary for this section + section_result = {"header": header, "blocks": []} - for block in blocks: - if block[0] is None: # This is a shell command block - section_result["blocks"].append({"type": "shell", "content": block[1]}) - else: # This is a SEARCH/REPLACE block - section_result["blocks"].append( - { - "type": "search_replace", - "filename": block[0], - "original": block[1], - "updated": block[2], - } - ) + for block in blocks: + if block[0] is None: # This is a shell command block + section_result["blocks"].append({"type": "shell", "content": block[1]}) + else: # This is a SEARCH/REPLACE block + section_result["blocks"].append( + { + "type": "search_replace", + "filename": block[0], + "original": block[1], + "updated": block[2], + } + ) - results.append(section_result) - except ValueError as e: - # If an error occurs, add it to the results for this section - results.append({"header": header, "error": str(e)}) + results.append(section_result) + except ValueError as e: + # If an error occurs, add it to the results for this section + results.append({"header": header, "error": str(e)}) # Output the results as JSON print(json.dumps(results, indent=4))