Metadata-Version: 2.4
Name: capov
Version: 0.1.5
Summary: Captain Obvious: Corrects all the obvious errors in a Python-script.
Author: Hans-Peter Radtke
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: autoimport<2.0.0,>=1.0.0
Provides-Extra: test
Requires-Dist: pytest; extra == "test"

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
