Skip to content
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

Check Python code formatting in CI #17142

Open
guitargeek opened this issue Nov 29, 2024 · 1 comment
Open

Check Python code formatting in CI #17142

guitargeek opened this issue Nov 29, 2024 · 1 comment
Assignees

Comments

@guitargeek
Copy link
Contributor

guitargeek commented Nov 29, 2024

Explain what you would like to see improved and how.

People regularly ask how the Python code contributed to ROOT should be formatted, or they submit code that needs to be re-formatted during the PR review.

It would be better to have a well-defined style and a CI check that enforces it.

Most Python code in the repository is formatted with black, using only the --line-length=120 option to be consistent with our C++ code style.

Maybe one could implement such a check using the GitHub Actions integration of black.

@andresailer
Copy link
Contributor

Alternatively ruff now has the possibility to do the same formatting as black.

https://docs.astral.sh/ruff/formatter/

@dpiparo dpiparo self-assigned this Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants