Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider replacing various linters/formatters with pre-commit and ruff #859

Open
bpkroth opened this issue Sep 23, 2024 · 0 comments
Open
Labels
dev-env low priority Low-priority issue

Comments

@bpkroth
Copy link
Contributor

bpkroth commented Sep 23, 2024

We have a decent collection of linters/formatters at this point to ensure good code quality.
However, they can take a while to run (pylint in particular) and a selling point for ruff is

⚡️ 10-100x faster than existing linters (like Flake8) and formatters (like Black)

We've worked around that somewhat by using make file rules that can execute in parallel, however that complicates the dev environment and dependencies a tad (which we again workaround using devcontainers).

Another option could be to use something like pre-commit and ruff.

A quick look seems to indicate it would flag a bunch of things off the bat, so we'd have to create a bunch of exceptions and/or cleanup some things at the same time.

We'd also probably want to remove a pile of our exceptions from the code.

And enable the VScode extension.

Anyways, not sure it's worth it, but here's a branch that quickly started that effort:

https://github.com/bpkroth/MLOS/tree/ruff

@bpkroth bpkroth added low priority Low-priority issue dev-env labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-env low priority Low-priority issue
Projects
None yet
Development

No branches or pull requests

1 participant