Better HN
topnewbestaskshowjobs
Log inSign up

morbo_yapf

1 karma · joined Apr 3, 2015 (11y ago) · 3 submissions

Submissions

comment 11y ago · link · parent

The warning about data literals is just to warn people that what comes out of YAPF may not look like they desire. The problem is that formatting data literals is hard. Even harder than formatting executable code. This is because there are so many different styles that could be applied to them. There's no "one size fits all" solution.

Therefore, YAPF (and even clang-format) balk on them. They will handle them of course. But the result will almost certainly not look like what you want.

That's why we give you the ability to disable formatting for sections of code.

comment 11y ago · link · parent

YAPF is still brand spanking new, so please use it and report any bugs you find.

We mention in the documentation that data literals are a sticking point to most people and most automatic formatters. Even clang-format tends to balk on them. We try our best at them, but it might be best to just disable formatting them if they are already formatted to something you like. :-)

comment 11y ago · link · parent

We need to have plugins for all editors. I'm not familiar with Sublime. But I would welcome people submitting plugins for it. :-)