An extremely fast Python linter and code formatter, written in Rust.
Find a file
2022-08-13 14:19:28 -04:00
.github/workflows Cache Cargo registry on GitHub Actions (#3) 2022-08-10 16:41:46 -04:00
resources/test/src Add another check 2022-08-09 22:36:29 -04:00
src Reorder imports 2022-08-13 14:19:28 -04:00
.gitignore Add Cargo.lock 2022-08-10 16:37:18 -04:00
Cargo.lock Include version in cache key 2022-08-13 11:57:27 -04:00
Cargo.toml Include version in cache key 2022-08-13 11:57:27 -04:00
LICENSE Create LICENSE 2022-08-10 15:44:55 -04:00
pyproject.toml Minor fixes to Maturin packaging 2022-08-10 19:29:25 -04:00
README.md Implement visitor pattern (#4) 2022-08-12 17:53:31 -04:00

rust-python-linter

A performance-focused, Pyflakes-inspired Python linter, written in Rust.

Features:

  • Python 3.8 compatibility
  • ESLint-inspired cache semantics
  • TypeScript -inspired --watch semantics

Installation

Available as rust-python-linter on PyPI:

pip install rust-python-linter

Usage

To run the linter, try any of the following:

rust_python_linter path/to/code/to/check.py
# ...or...
rust_python_linter path/to/code/
# ...or...
rust_python_linter path/to/code/*.py

You can also run in --watch mode to automatically re-run the linter on-change with, e.g.:

rust_python_linter path/to/code/ --watch

Development

As the name suggests, rust-python-linter is implemented in Rust:

cargo fmt
cargo clippy
cargo run resources/test/src

Deployment

rust-python-linter is released for Python using maturin:

maturin publish --skip-existing --target x86_64-apple-darwin
maturin publish --skip-existing --target aarch64-apple-darwin