Skip to content

Linters

Development on the Python wrapper may involve changes in either the Python or Rust code. Each language has distinct linter tests that must be passed before committing changes.

This project uses the following Python linters and formatters:

  • isort
  • black
  • flake8
  • mypy

To check formatting and run static analysis for Python code, use the dev.py utility from the root python/ directory:

Terminal window
python3 dev.py lint

By default, this will auto-fix formatting issues using isort and black. If you want to only check formatting without modifying any files, pass the —check flag:

Terminal window
python3 dev.py lint --check

For Rust code, run manually:

Terminal window
rustup component add clippy rustfmt
cargo clippy --all-features --all-targets -- -D warnings
cargo fmt --manifest-path ./Cargo.toml --all