Batch Syntax Repair From Injection Errors

Detect and fix systematic syntax errors caused by line-injection scripts that split multiline constructs

vamseeachanta 8268ab9 704 B Updated

File contents

Batch Syntax Repair from Injection Errors

When an automated script inserts lines at fixed positions without parsing context, it often splits multiline imports or statements, causing SyntaxError across multiple files. Use ast.parse() to identify all broken files in one pass, then write a regex or line-based fixer that respects continuation blocks (unclosed parentheses, backslashes). Test the fixer on a subset, then apply batch-wide. Verify with full syntax check (python -m py_compile *.py or equivalent) before commit.

vamseeachanta/workspace-hub/tree/main/.agents/skills/workspace-hub/learned/batch-syntax-repair-from-injection-errors commit 8268ab9744

Frequently asked questions

npx skillmds@latest add vamseeachanta/batch-syntax-repair-from-injection-errors