kieran-ryan opened a new pull request, #2026: URL: https://github.com/apache/buildstream/pull/2026
Migrates Python formatting to [ruff](https://docs.astral.sh/ruff/) from [black](https://black.readthedocs.io/en/stable/) to speed up formatting by multiples (see below benchmarks); and for robustness improvements; such as those applied by the formatting of this merge request to string formatting, trailing commas rather than a mixture with and without; improved formatting of arguments, whitespace line handling, etc. - though all of which would are providing with later releases of various Python formatter tools. The [ruff formatter](https://docs.astral.sh/ruff/formatter/) is "designed as a drop-in replacement for [Black](https://pypi.org/project/black/)". The caching in particular improves development workflows with tools such as IDEs and hooks. [Ruff's default configuration](https://docs.astral.sh/ruff/configuration/) is a superset of those specified by the _black_ configuration within the `pyproject.toml`; and thus only required extension to the custom path `src/buildstream/_protos`. <details> <summary>Cold runs with black and ruff</summary> <h5>Black</h5> <img src="https://github.com/user-attachments/assets/af0a05f3-ae2a-4cfc-97f8-320f77d5a9cc"/> <h5>Ruff</h5> <img src="https://github.com/user-attachments/assets/23818010-9f1d-4eda-8b2b-575fd3ae98fc"/> </details> <details> <summary>Warm runs with black and ruff</summary> <h5>Black</h5> <img src="https://github.com/user-attachments/assets/da115524-a98a-4f8a-940b-f4d464fe644b"/> <h5>Ruff</h5> <img src="https://github.com/user-attachments/assets/0836be6c-251e-4288-9509-baf1f6890fb3"/> </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
