-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Python] Configure pre-commit hook to run ruff
on archery
and other developer tools
#45754
base: main
Are you sure you want to change the base?
Conversation
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format?
or
See also: |
Later on we could add other python scripts to ruff formatting, such as:
|
I am aware that this is a somewhat controversial topic, but black/ruff are becoming standard nowadays and can can save us a significant amount of manual work. While cython isn’t supported by either of these tools, we have plenty of pure Python code where we could benefit from modern automatic formatting. I understand that we have different style preferences, but maintaining consistency without an auto formatter is simply too time consuming.
Here I configured
ruff
to be used on the developer tools under thedev/
directory. I applied formatting and configured a list rules to exclude when runningruff check dev/
. Some of these rules would make sense to enable, but I wanted to keep manual edits low for now, we can enable those incrementally in follow-ups.