pksunkara / alpaca

Given a web API, Generate client libraries in node, php, python, ruby
Mozilla Public License 2.0
2.45k stars 89 forks source link

Python: code style fixes #26

Closed matrixik closed 10 years ago

matrixik commented 10 years ago

I believe I did not screw anything up

pksunkara commented 10 years ago

That link says 2 blank lines seperating "top-level functions" and "class definition". There are no top level functions.

pksunkara commented 10 years ago

Please fix the above mentioned. And after doing that, could you squash all this into a single commit?

More info about squashing, http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html

Thanks

matrixik commented 10 years ago

If pep8 tool [1] are saying: request_handler.py:4:1: E302 expected 2 blank lines, found 1 then there should be 2 lines.

[1] https://pypi.python.org/pypi/pep8 - pep8 is the standard tool to check against rules from PEP 8 (http://http://legacy.python.org/dev/peps/pep-0008)

There is also flake8 (I use it): https://pypi.python.org/pypi/flake8

Flake8 is a wrapper around these tools:
    PyFlakes
    pep8
    Ned Batchelder's McCabe script

And most powerful pylint (I also use it): https://pypi.python.org/pypi/pylint

pksunkara commented 10 years ago

Ok. Leave the extra lines.

matrixik commented 10 years ago

Just FYI: pep8 tool (or flake8) should be used together with pylint, not one or the second, they are complementary.

matrixik commented 10 years ago

Check now, please