Consider Utilizing Ruff
Opened this issue · 0 comments
cam-barts commented
As requested in #61, this issue is to track potentially moving to Ruff.
An extremely fast Python linter, written in Rust.
Ruff boasts being a drop in replacement for flake8 as long as certain conditions are met (this project meets those conditions).
On the direction of @priv-kweihmann, I'm happy to generate a PR that does most of the conversion:
- Run an initial fix on the repo (about 3000 changes, mostly single quotes to double quotes and adding type hints)
- Update github actions to use ruff or adding ruffs own action
- Add pre-commit hooks for ruff to help new contributors make good changes
- pre-commit can be controversial, as some feel it slows down development time. I've found as a code base grows, having a flake8 pre-commit hook can feel sluggish, but switching to ruff I've never found it take even a noticeable amount of time unless of course there are changes to be made. Let me know your thoughts here.
- Adding a sensible pyproject.toml based configuration for this project
- setting pydocstyle convention to numpy
- setting the line length to match blacks (88)
- adding per file ignores for things like asserts in pytest modules