Closed stuaxo closed 3 years ago
I experimented with applying black to spylls codebase and was not pleased with the result. The code is carefully crafted to represent algorithms in succinct and readable way, and black's mechanical "uncompromised"™ fixes hardly make it better. I use pylint, flake8, and mypy to ensure I follow the good coding practices, but as about line length and placement of linebreaks—I prefer it my way.
A little random illustration, talking for itself, I believe (that's changes black suggests):
(On a more philosophical note, I find the whole premise "somebody already made all code style decisions for you so you won't make them" not compelling.)
As a pedantic side note - the indentation in the docs in the README is not 4 spaces, as in PEP8
Now that's a valid concern and I'll fix it, thanks. Old habits editor settings die hard!
Fair enough :) I think there are things you can run to check the formatting in markdown, but can't remember them rn.
Black is a pretty good option for formatting code + can be integrated with Poetry / pyproject.toml
Since it's pretty strict it stops a lot of the battles that can happen over this.
(As a pedantic side note - the indentation in the docs in the README is not 4 spaces, as in PEP8)