Hacker News new | ask | show | jobs
by baq 4095 days ago
i use autopep8 and haven't been thrilled. it gets the job done, but i'll switch in a heartbeat if this is better. we'll see.
2 comments

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. :-)

yapf's approach is, philosiphically, different from autopep8. yapf doesn't just fix pep8 violations. It takes a look at your whole code, and reformats it to a canonical form. If you've ever used "go fmt" or "clang-format" (for C/C++), this is the same idea