Open flexatone opened 1 year ago
This particular style choice of Black also troubles me. That's what motivated me to start a more configurable formatter based on a fork from Black: https://github.com/jsh9/cercis
My project already supports indenting by 8 spaces at function definitions. And I plan to add more configurable options.
Please feel free to try it out and provide feedback.
Thank you for starting this project!
For a very long time I have been using an extra indent to distinguish continuation lines. This is defined as an option in PEP 8:
I use this consistently for function definitions or any other line continuation. The rule is simple, and I find it significantly helps in distinguishing line continuations from blocks of code created by loops, branches, function/class definitions, etc. This is a silly example but it conveys the idea:
Real code examples can be seen here:
https://github.com/static-frame/static-frame/blob/master/static_frame/core/series.py
I have not used
black
because it eliminates the information provided by these extra indents. I would be thrilled ifblue
might support this. I could work on a PR if there is interest.