Closed JonathanPlasse closed 7 months ago
@nutti, I reworked the PR to keep the same behavior as before, only replacing the YAPF by Ruff. The CI now passes.
@JonathanPlasse
Thanks for your effort! Looks good to me about Ruff code.
I have another request about this PR. Is it possible to co-exist with YAPF and Ruff, and switch them from the environment? I will show you the brief example.
$ export GEN_MODULE_CODE_FORMAT: "ruff"
$ bash tools/pip_package/build_pip_package.sh ...
$ export GEN_MODULE_CODE_FORMAT: "yapf"
$ bash tools/pip_package/build_pip_package.sh ...
I understand Ruff is the better case, but we want to support YAPF format for a while.
@nutti, I added back the possibility to format with YAPF.
@JonathanPlasse
Ruff is so fast! Thank you for your suggestion 👍
That is one of the reason why I suggested using it instead of pycodestyle and pylint.
Purpose of the pull request
Reduce to nearly zero the time to format the generated code.
Description about the pull request
Remove YAPF formatting in the code generation. Format with Ruff the entire generated code at the end.