Re:Format Python Code Using YAPF
by scrollaway on Sunday February 09, 2020 @07:44AM
(#22281820)
Prettier is more widespread than black, is very opinionated, and still has an option for tab indent. This is a strawman.
[ Parent
| on HN ]
How is this argument a strawman?
Prettier's opinion then is that tabs are irrelevant to the formatting. Which is probably fine for the all the languages Prettier seems to support. Unlike Python, where tabs vs spaces matter. Mixing tabs and spaces is a problem, and a formatter cannot automatically support both or risks changing the meaning of code.
Re:Format Python Code Using YAPF
by scrollaway on Tuesday February 11, 2020 @09:09AM
(#22298561)
I don't know how you arrive to this conclusion… prettier never mixes tabs and spaces, it would be a bug if it did. And there's no meaningful difference between tabs and spaces in Python either. Python has significant indent stops, that's all.
Furthermore, prettier has a python plugin which does support tabs.