-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap out Flake8 for ruff in linting (#232)
## Ticket Resolves #107 ## Changes Change our linter from flake8 to ruff Python package updates ## Context for reviewers [ruff](https://docs.astral.sh/ruff/) is a linter built in Rust that is both better performing and contains much more options than flake8 (including many of the Flake8 rules). Ruff has a lot of [potential rules](https://docs.astral.sh/ruff/rules/) we could configure, but to keep things simple, I ported over the same rules that we already had configured. If we want to try out any of the other rules, we can follow up with that. For context, enabling all rules causes ~1300 errors, although many of the common ones I see are not issues I think we would want to actually consider (complaining about using `assert` in test functions) Ruff can also serve as a formatter of code, potentially replacing black + isort, but I'll explore using that later as the change is likely much bigger as it would cause a lot of little formatting differences ## Testing Was able to run ruff via `make lint-ruff` and only encountered a few small issues that I fixed. We also switched to using this approach a few months ago in the simpler grants codebase and haven't run into any issues. HHS/simpler-grants-gov#1626 --------- Co-authored-by: nava-platform-bot <platform-admins@navapbc.com>
- Loading branch information
1 parent
e6093b3
commit 39affbf
Showing
10 changed files
with
1,092 additions
and
1,040 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.