-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
As mentioned by @sbc100 in #7181 (comment)
We could also encourage the use of yapf which actually makes all the formatting decisions for you: https://github.com/google/yapf. Similar to clang-format.
To be complete, another popular tool now is https://github.com/psf/black though it won't work with 2 space indentation.
This might make different Python scripts / modules a bit more readable and easier to contribute to, in particular when used in combination with pre-commit.
Though it might make using git blame [1] and conflict resolution in PRs [2] slightly harder.
[1] https://black.readthedocs.io/en/stable/guides/introducing_black_to_your_project.html#avoiding-ruining-git-blame
[2] scikit-learn/scikit-learn#20260 (comment)
(links are for black, but I imagine with yapf it would be a similar situation)