News for hackers. Stuff that matters.

morbo_yapf

Re:YAPF – A formatter for Python files on Friday April 03, 2015 @02:06AM (#9314573)
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.

Re:YAPF – A formatter for Python files on Friday April 03, 2015 @01:58AM (#9314560)
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. :-)

Re:YAPF – A formatter for Python files on Friday April 03, 2015 @01:53AM (#9314548)
We need to have plugins for all editors. I'm not familiar with Sublime. But I would welcome people submitting plugins for it. :-)