8 comments

[ 4.7 ms ] story [ 31.1 ms ] thread
Interesting, but on a quick test it looks like it changes UNIX-style line endings (LF) to Windows (CRLF).
This shouldn't happen - please report an issue
Look's interesting, but I hesitate to use a Python formatting tool whose own code runs counter to well accepted Python stylistic guidelines -- namely "Use 4 spaces per indentation level." (https://www.python.org/dev/peps/pep-0008/#indentation)
Without some examples from the author (or sinking time into installing/playing with it) it's pretty hard for me to tell what it's actually going to do with the code.

AutoPEP8 will generally intelligently pick between a standard hanging indent, a deep hanging indent, and an aligned indent. Does this not do so?

Edit: oh, I see. The author's code uses two spaces. Heh.

yapf is developed using an internal Google coding style. Please don't hold it against the project :-) Once you get used to the style, the code of yapf is very consistent in terms of style (it was formatted with yapf itself!) and should be easy to understand & work with.

It does support the PEP8 style out of the box, however.

I think you've conflated Chromium style with Google style.

https://www.chromium.org/chromium-os/python-style-guidelines

...is 2 spaces.

http://google-styleguide.googlecode.com/svn/trunk/pyguide.ht...

...is 4 spaces.

The other difference is naming style. Chromium uses CapWords instead of snake_case.

Edit:

https://news.ycombinator.com/item?id=1311799

^ that notes that you're referring to an internal style guide. Their external guide (which is the one I'd think I'd be following) is more PEP8-y.

You might consider renaming your "google" to "google-internal." But since Chromium appears to be the remaining big external-facing project using the old internal style, I'd suggest chromium vs. google vs. pep8. That would make more sense to the wider audience.