977 B
977 B
Python Syntax Checker Artifact
Overview
A standalone Python script that validates Python source files for syntax errors using the AST module.
Location
/root/.hermes/wizard-outputs/spark/python_syntax_checker.py
Features
- Checks a single Python file for syntax errors
- Can recursively check all .py files in a directory
- Reports count of valid/invalid files and detailed error messages
- Returns appropriate exit codes (0 = all valid, 1 = syntax errors found)
Usage
# Check single file
python3 python_syntax_checker.py <file.py>
# Check directory (non-recursive)
python3 python_syntax_checker.py <directory>
# Check directory (recursive)
python3 python_syntax_checker.py <directory> --recursive
Verified Tests
- Self-validation: Exit code 0, output "OK: ..."
- Bad syntax detection: Exit code 1, reports specific error
- Directory scanning: Found 193 valid Python files, 0 invalid
Commit
Pushed to troupe-standup as commit 8787fb3