-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Use ruff for linting and formatting #555
Conversation
def f(): | ||
def _function_without_seealso_and_examples(): | ||
""" | ||
A function whose docstring has no examples or see also section. | ||
|
||
Expect SA01 and EX01 errors if validation enabled. | ||
""" | ||
pass |
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.
I did not know a function with only a docstring is valid!
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.
Looks good to me; I agree that it's better to get the toolchain in place quickly, and to the iteratively refine.
A couple of issues:
BadExamples
innumpydoc/tests/test_validate.py
.pytest -v --pyargs numpydoc
. For the prerelease test we runpytest -v --pyargs .
.numpydoc/tests/hooks
is in the source directory:but isn't in the installed package
I ignore a large number of linting checks because they don't have automated fixes (or their automated fixes are unsafe). I think we should eventually enable them one by one and implement the fixes in follow-up PRs. I would like to keep them separate because they will require more attention and careful review than these changes. I would like to get this PR in relatively quickly because I think moving to ruff is worth it. It is much faster, implements multiple tools, is being rapidly developed, and has been adding features specific for our community.