I was wondering if there exists a sort of Python beautifier like the gnu-indent command line tool for C code. Of course indentation is not the point in Python since it is progra
autopep8 attempts to automate making your code conform to pep8 coding standards
https://pypi.python.org/pypi/autopep8
Have you looked at pindent?
I am the one who asks the question. In fact, the tool the closest to my needs seems to be PythonTidy (it's a Python program of course : Python is best served by himself ;) ).
PyLint has some formatting checks.
You can also try yapf
:
A formatter for Python files
https://github.com/google/yapf/
black is another recent option.
It provides deliberate and fast code formatting and is used by many projects such as pytest
, SQLAlchemy
and Pillow
to name a few.