mirror of https://github.com/mtshiba/pylyzer
|
|
||
|---|---|---|
| .github | ||
| crates/py2erg | ||
| extension | ||
| images | ||
| src | ||
| tests | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
| pyproject.toml | ||
README.md
pype
pype is a static code analyzer / language server for Python written in Rust.
Installation
pip
pip install pype
cargo (rust package manager)
cargo install pype
or download the binary from the releases page.
What is the advantage over pylint, pyright, pytype, etc.?
- Performance: pype can inspect Python scripts on average 100 times faster than pytype and pyright. This is largely due to the fact that pype is implemented in Rust, whereas pytype is implemented in Python.
- Detailed analysis
pype can do more than the usual type testing. For example, it can detect out-of-bounds accesses to lists and accesses to nonexistent keys in dicts.
- Reports readability: While pytype's error reports are crude, showing only that an error has occurred, pype shows where the error occurred and provides clear error messages.
How it works
pype uses the type checker of the Erg programming language internally. This language is a transpiled language that targets Python, and has a static type system.
pype converts Python ASTs to Erg ASTs and passes them to Erg's type checker. It then displays the results with appropriate modifications.


