A Python source formatter that uses the tokenize library to ensure correctness
formatter2 is a Python formatter based on the tokenize library in Python. Due to a bug with line continuations we are currently running a fork of the tokenize library however.
During every format sequence the compile method is used to check if no code has been broken, but backing up is still a good idea.
The library is made to be very extendable and configurable but it’s still in the beginning phase. Eventually this will become a fully featured formatting tool for Python.
To install simply execute python setup.py install or pip install formatter2. If you want to run the tests first, run nosetests
To format all of your code recursively (MAKE BACKUPS!):
python-formatter -r DIRECTORY
format-python -r DIRECTORY
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size formatter2-1.3.0-py2.py3-none-any.whl (25.7 kB)||File type Wheel||Python version 2.7||Upload date||Hashes View|
|Filename, size formatter2-1.3.0.tar.gz (18.2 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for formatter2-1.3.0-py2.py3-none-any.whl