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
Add ruff linter #3299
Add ruff linter #3299
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## RELEASE_next_patch #3299 +/- ##
======================================================
- Coverage 80.25% 80.14% -0.11%
======================================================
Files 147 147
Lines 21859 21840 -19
Branches 5143 5144 +1
======================================================
- Hits 17542 17504 -38
- Misses 3111 3126 +15
- Partials 1206 1210 +4 ☔ View full report in Codecov by Sentry. |
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.
Most of these changes look good but is there a reason not to take the unused imports and set:
__all__=["previously_unused_import", ... ]
Or is there a reason against this?
@@ -63,7 +65,7 @@ | |||
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54" | |||
|
|||
try: | |||
import sphinxcontrib.spelling | |||
import sphinxcontrib.spelling # noqa: F401 |
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.
It might be good to add this to the dev guide as how to stop the linter from linting :)
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.
Done!
Ruff can be used for linting and formatting. This PR update code to pass
ruff check
(https://docs.astral.sh/ruff/linter/) which does the same asflake8
.Progress of the PR
upcoming_changes
folder (seeupcoming_changes/README.rst
),readthedocs
doc build of this PR (link in github checks)