Replies: 5 comments 11 replies
-
Thanks! I probably won't use Suggest to look at this! |
Beta Was this translation helpful? Give feedback.
-
Hi @kattkieru, I just saw you post here (astral-sh/ruff#2319), so I'm tagging you here for your awareness. If you are interested, please feel free to try out this tool and provide feedback. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Thanks, this is very impressive and very much appreciated! I did a quick test and tabs seem to work as expected. Collapsing nested brackets is a massive improvement. I will definitely be switching to Cercis when I get the chance. I have also forked Black to add tab support as well as a few personal stylistic preferences. Tabs was really not that much effort to get working. What stood out to me was how many times they hardcoded Black's stance on this is just incredibly bizarre to me. I work on a Python web application which uses Prettier and about five other Python formatting tools (particularly, In the case of a web application, it's absurd that I would have to either deal with half the project using different indentation or reconfigure Prettier and reformat half the project again just to use Black as they intend. Black's aggressive responses, the close-mindedness on accessibility (especially), the fact that they already support similar preferences like line length, the fact that tabs is the first question in their FAQ... Rather than implement a low-effort, commonly supported preference that some projects clearly need, they choose to make it difficult or impossible for those projects to use and benefit from their otherwise excellent tool. That's a shame. I'd like to make one suggestion that I implemented in my fork:
|
Beta Was this translation helpful? Give feedback.
-
Hi @raylu, @nilsbunger, @Gotos, @awoo-civ, @samtygier-stfc, @Avasam, @reitzensteinm, @memark: I saw that you upvoted/hearted this comment (astral-sh/ruff#1904 (comment)) by @JimDabell, so I assume you are all looking for a Python auto-formatter that supports different indentation styles. I forked
One or more of these options should satisfy your use case. Please feel free to take a look and provide feedback! Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi @silverwind, I saw in this post (astral-sh/ruff#1904 (comment)) that you need 2-space indentation. Lots of downvotes as expected, and I know Nevertheless, I forked My fork is the repo that contains this discussion, and you can set |
Beta Was this translation helpful? Give feedback.
-
Hi @onlycs, @dhushyanth-s, , @SkirOwen, @mabeyj, @itsthejoker, @JimDabell, @caniko, @blooalien, @DaRoee, @rslinckx, @BrettMoan:
I recently forked Black (https://github.com/psf/black) and started to make my fork more configurable: https://github.com/jsh9/cercis
My main motivation for forking was not to use tabs (I personally use spaces), but I added tab support after reading all these discussions:
You either participated in them, or you up-voted the "give us tab option" comments. Your reasons for wanting tabs differ, but I think they are all valid, so I empathize with you.
I added two options:
--use-tabs
(bool, default = False)--tab-width
(int, default = 4)In particular, the 2nd option is necessary for getting the line length correctly (because we can't simply assume a tab has a width of 4).
Please feel free to try it out (the documentation is in README) and please feel free to share feedback with me!
Also, I'm cc'ing @sciyoshi, @jleclanche, @FredHappyface because I saw that you also forked Black just to add tab support. I read your relevant comments on Black's issue board -- I really can empathize with your frustration.
Beta Was this translation helpful? Give feedback.
All reactions