Conversation
|
I like it 👍 I've seen more and more Python projects adopt black such that it now seems very natural style to me. I think it makes the process easier for new contributors as they won't need to stress or think about the project's coding style. Instead just let the tool handle it. As a mere infrequent outside contributor, I'm for it. |
|
Provided it is just run automatically over new code, I could see this as being a time saver. On the other hand, will new contributors be confused about why their code has rearranged itself? Note that you'd also want to add this to requirements.txt |
You do need to run the command, it's not in a pre-commit hook or anything (but if they wished they could create one, or add it to their editor on save). But it's just a On the CI,
Added. |
7b0ce05 to
6c544cc
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
If no other comments, let's merge this and I'll make a new PR for the other directories. |
|
Consider merging in #3898 first, before the changes from this PR make a simple revert unviable. |
|
Yep, good idea. |
I'd like to suggest formatting the code with Black:
https://black.readthedocs.io/en/stable/the_black_code_style.html
Black intentionally doesn't provides many options, and I've not used them here. The idea is you just run
blackand it takes care of everything for you.I added
#fmt:off/fmt:onto retain formatting only where the shape of a list is important, for matrices.Only the
srcdirectory has been done here for demonstration, let me know what you think.