-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Add GitHub workflow for check Python file formatting #65482
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
Conversation
Using darker which is doing black on diffs, similar to git-clang-format.
May be this should be part of the build as |
Not sure what you mean. I am not familiar with what polly does? We seldom "build" for python scripts. |
Ping @JDevlieghere as well since lldb has a lot of python. |
Nothing prevents to run some tools (formatters, linters) over Python source files during build. Sure, relevant rules should be added to CMake files. |
That's true of course. But I don't think it will gain us anything here. It's going to be hard to do patch based formatting from CMake. We also need to install the whole toolchain and configure CMake just to run the formatters. So it adds a lot of complexity without a clear gain. I think we might want to add darker to the pre-commit hook. |
This is great! Regarding the discussion about making this part of CMake: I agree with Tobias. We don't do this for clang-format either and I don't really want a build/configure step to modify my source directory. I think a pre-commit hook or workflow makes a lot more sense. |
@tstellar any more objections or can I merge this? |
@tru No, this seems fine. |
Using darker which is doing black on diffs, similar to git-clang-format.