-
Notifications
You must be signed in to change notification settings - Fork 36
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
Update docs to remove flake8, isort mentions and add ruff #502
base: main
Are you sure you want to change the base?
Changes from all commits
5f5bcbc
9fddf99
d712b1d
ebff1e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ Many are very helpful, but they do take a little time to learn. The more time yo | |
|
||
### Linting tools | ||
These _check_ your code. | ||
* [flake8](https://flake8.pycqa.org/) - checks various code style conventions, unused variables, line spacings, etc… | ||
* [ruff](https://github.com/astral-sh/ruff) - checks various code style conventions, unused variables, line spacings, etc… | ||
* [mypy](https://github.com/python/mypy) | ||
- Static type checker: enforces proper usage of types. | ||
- Super useful once you get the hang of it, but definitely an intermediate-advanced tool. | ||
|
@@ -25,12 +25,6 @@ These _check_ your code. | |
These _auto-modify_ your code. | ||
* [black](https://github.com/psf/black) | ||
Forces code to follow specific style, indentations, etc... | ||
Comment on lines
26
to
27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah right -I only see one rule though https://github.com/napari/napari/blob/b9dc8dca1e1afa7567586e7ffa7a36cc7cd9fb6f/pyproject.toml#L245 so I'll again just point people to the pyproject.toml in case there are future updates. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes. The list of used linters is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @melissawm If you scroll down from your link, ruff is performing all of the task that you had in the original text since it is a drop-in replacement for these tools. Perhaps link out to ruff docs: https://docs.astral.sh/ruff/linter/#the-ruff-linter |
||
* [autoflake](https://github.com/PyCQA/autoflake) | ||
Auto-fixes some flake8 failures. | ||
* [isort](https://github.com/PyCQA/isort) | ||
Auto-sorts and formats your imports. | ||
* [setup-cfg-fmt](https://github.com/asottile/setup-cfg-fmt) | ||
Sorts and enforces conventions in setup.cfg. | ||
|
||
### Pre-commit tools | ||
* [pre-commit](https://pre-commit.com/), runs all your checks each time you run git commit, preventing bad code from ever getting checked in. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.