notification-api icon indicating copy to clipboard operation
notification-api copied to clipboard

Experiment - Add Ruff formatter/linter

Open whabanks opened this issue 1 year ago • 0 comments

Summary | Résumé

This experimental PR migrates our linters/formatters to Ruff which:

  • Has drop in feature parity with black, isort, and flake8
  • Is written in Rust and hence faster than black, isort and flake8
  • Has supporting Github actions and VSCode extensions
  • Caches results for even snappier analysis after an initial run

Changelog:

  • Replaced black, isort, and flake8 with Ruff
  • Added the poetry plugin poetry-plugin-sort which organizes dependencies in pyproject.toml
  • Added the Ruff plugin to devcontainer.json
  • Updated the betterTOML plugin as it was deprecated
  • Removed deprecated linter settings in devcontainer.json

File change list (excludes formatting changes):

Because I wasn't smart enough to commit the formatting changes separately... 🤦

Before:

image

After:

image

After first run with cache:

image

whabanks avatar Feb 16 '24 20:02 whabanks