Thursday, May 28, 2015

pep8

I've got very comfortable with clang-format for C++ and gofmt for Go. Every time I have to use some other language i'm missing them very much. Today I've found a solution for Python. It makes life so much easier. The two awesome tools are:

pep8

pep8 is a tool to check your Python code against some of the style conventions in PEP 8.
https://pypi.python.org/pypi/pep8

autopep8

autopep8 automatically formats Python code to conform to the PEP 8 style guide. It uses the pep8 utility to determine what parts of the code needs to be formatted. autopep8 is capable of fixing most of the formatting issues that can be reported by pep8.
https://github.com/hhatto/autopep8