-
Notifications
You must be signed in to change notification settings - Fork 3.7k
GH-46546: [CI][Dev][Python] Use pre-commit for numpydoc #46595
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
base: main
Are you sure you want to change the base?
Conversation
|
arrow/dev/archery/archery/lang/python.py Lines 115 to 256 in 1943911
But we can't use it with Do we need the Cython integration? |
.pre-commit-config.yaml
Outdated
^python/pyarrow/ | ||
exclude: >- | ||
( | ||
?^python/pyarrow/interchange/from_dataframe\.py| |
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.
JFYI: other files contains $
character like ?^python/pyarrow/interchange/from_dataframe\.py$
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.
Good catch!
I've added $
.
We want to validate docstrings regardless of how the functions are generated, yes.
We can probably do that. However, we may have to wait for cython/cython#6904 to be released first. cc @raulcd |
The problem is we don't know if numpydoc will accept a contribution for it. We can still use Archery-based lint for numpydoc. I don't think there's any urgency. |
Rationale for this change
We want to migrate to pre-commit from
archery lint
.What changes are included in this PR?
Use pre-commit for numpydoc but this doesn't support Cython files.
Are these changes tested?
Yes.
Are there any user-facing changes?
No.