A Python source formatter that uses the tokenize library to ensure correctness
Project description
Introduction
formatter 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.
Install
To install simply execute python setup.py install or pip install formatter. If you want to run the tests first, run nosetests
Usage
To format all of your code recursively (MAKE BACKUPS!):
formatter -r DIRECTORY
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file formatter-1.0.1.tar.gz
.
File metadata
- Download URL: formatter-1.0.1.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85666304613069a618d0a7ecfe7c96bf4819ec683ca1e949138e66365535195e |
|
MD5 | 5fc351d063dba03a14c5d3c07acb8ae1 |
|
BLAKE2b-256 | 2ab6f2b6376451dbf4a7a40161116fc6f9a69c9466201212f7097cacddc69ae5 |