Go to file
Shunsuke Shibayama 53ea735842 Create pyproject.toml 2022-12-13 16:11:02 +09:00
.github initial commit 2022-12-12 22:40:50 +09:00
crates/py2erg initial commit 2022-12-12 22:40:50 +09:00
extension initial commit 2022-12-12 22:40:50 +09:00
images Add images 2022-12-12 23:49:12 +09:00
src initial commit 2022-12-12 22:40:50 +09:00
tests Add images 2022-12-12 23:49:12 +09:00
.gitignore initial commit 2022-12-12 22:40:50 +09:00
Cargo.lock initial commit 2022-12-12 22:40:50 +09:00
Cargo.toml initial commit 2022-12-12 22:40:50 +09:00
LICENSE initial commit 2022-12-12 22:40:50 +09:00
README.md Update README.md 2022-12-13 16:11:00 +09:00
pyproject.toml Create pyproject.toml 2022-12-13 16:11:02 +09:00

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.

performance

  • 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.

analysis

  • 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.

reports

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.