emscripten-core / emscripten-core/emscripten
Auto-format Python code
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
As mentioned by @sbc100 in https://github.com/emscripten-core/emscripten/issues/7181#issuecomment-425252819
> 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](https://pre-commit.com/).
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] https://github.com/scikit-learn/scikit-learn/pull/20260#issuecomment-860992307
(links are for black, but I imagine with yapf it would be a similar situation)
Contributor guide
Assessment
This issue has not been assessed yet.