[!TIP] Available commands for omnitype:
# Run all tests # Build in release mode # Run with debug logging RUST_LOG=debug # Launch the Terminal UI (default if no subcommand) # or explicitly # Check Python files in a path (text or JSON output) # Set log level for any command # Fix annotations in place (adds : Any / -> Any and import) # (Scaffolded) Runtime tracing for tests
[!NOTE] Current capabilities:
check: parses Python and reports per-file function/class counts plus diagnostics (e.g., missing param/return annotations). Exits with code 1 if diagnostics are found.fix: adds missing: Anyon untyped parameters and-> Anyon functions lacking a return type; insertsfrom typing import Anywhen needed.- TUI: Files/Types/Errors/Logs/Editor tabs. Press
aon a.pyfile in Files to analyze. Errors tab lists diagnostics; Enter opens the file and the Editor jumps to the diagnostic line. Editor supports Up/Down scrolling.
[!WARNING] Scope and limitations (truth in advertising):
- Target language: Python. Point it at a
.pyfile or a directory of Python source.- Analysis: basic parsing + simple diagnostics (primarily missing parameter/return annotations). No full type inference or constraint solving yet.
- Fixes: heuristic text edits to add
: Any/-> Anyand the corresponding import; complex signatures and code styles may not be perfectly handled.- Runtime tracing: not implemented yet.
[!TIP] Release notes automation:
- Pushing a tag like
v0.1.0triggers a workflow that runs.github/scripts/generatecodediffs.shand uploadsrelease_<tag>_changes.mdas an artifact.
[!IMPORTANT] Core features (type checking, fixing, and runtime tracing) are currently in development. The basic project structure and test framework are in place.
Development & CI Commands
[!TIP] Complete command suite for development and CI troubleshooting:
# Basic development workflow # CI-specific checks (matches GitHub Actions) # Fix common CI issues # Install required tools for full CI compatibility # Git workflow after fixesCommon CI failure fixes:
- Clippy errors: Run
cargo clippy --fix --all-targets --all-featuresthen commit changes- Unused dependencies: Run
cargo +nightly udeps --all-targets, remove unused deps fromCargo.toml- Format issues: Run
cargo fmtthen commit changes- Security vulnerabilities: Run
cargo auditand update vulnerable dependencies- clippy.toml issues: Ensure no duplicate keys and use threshold-based config (see
clippy.toml)Clippy configuration notes:
- Use
*-thresholdsettings instead of allow/deny lists inclippy.toml- Common thresholds:
cognitive-complexity-threshold = 15,too-many-arguments-threshold = 7- For recursive functions, add
#[allow(clippy::only_used_in_recursion)]attribute
A hybrid type checker for Python and other dynamic languages.
— @omnitype by harper