CapOv β Captain Obvious
Fixes the dumbest, most obvious Python code errors automatically.
CapOv corrects only the 100% safe stuff: missing imports, duplicate imports, unclosed brackets, and more β with zero assumptions.
π§ Installation
pip install capov
π Example usage
from capov.fixers import process
code = '''
import os
import os
x = [1, 2, 3,
print(json.dumps(x)
'''
fixed = process(code)
print(fixed)
Command-line:
python -m capov your_script.py [options]
Options:
- --in-place β Overwrite the input file
- --output FILENAME β Write fixed code to a separate file
- --backup β Create a .bak backup before overwrite
- --verbose β Print debug messages
- --log FILE β Log to specified log file
π§ͺ Run tests
To verify installation and test functionality:
python3 -m capov.tests
π Project structure
- capov/ β main package
- fixers.py β bug fixing logic
- main.py β CLI entry point
- example.py β example usage
- tests/
- test_cli_full.py β full run tests
- test_cli_params.py β CLI parameter tests
- test_module_usage.py β module usage tests
- faulty_scripts/ β broken Python samples
CapOv is your cleanup butler. Let him sweep the dumb bugs so you don't have to.
Submit bugs or contribute: https://github.com/HansPeterRadtke/capov