Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Summary Fixes #1587 ### Time to review: __3 mins__ ## Changes proposed Update our API linting to use ruff instead of flake8 ## Context for reviewers [ruff](https://docs.astral.sh/ruff/) is a linter (and formatter although we aren't using that yet) that does what flake8 does, but does it faster and with many more configuration options (not yet used). Conveniently, it even uses the same rules as flake8, so switching just required adjusting where the configuration was defined. Note that https://pypi.org/project/flake8-mypy/ was something we previously had configured, but has been abandoned for years, and I'm not quite sure what its purpose was (we use mypy - which handles type linting anyways?). A few of the ignore rules were modified as we were either ignoring things that were removed or that just made sense to no longer ignore. There are many, many rules that we could add, but I wanted to keep this PR contained to just porting us over, and not reconfiguring things - turning on every rule gives 3k+ errors, mostly in our tests for things we wouldn't care about. We likely will need to have different settings for tests and non-tests if we want to turn on a lot more. Additionally, while ruff can be used as a formatter, and replace our usage of isort & black potentially, that would cause a fair number of changes at the moment (~25 files, mostly commas, line-length and white space), and I'll leave that as a later follow-up.
- Loading branch information