Skip to content

A Python formatter based on the Python tokenize lib to ensure validity

License

Notifications You must be signed in to change notification settings

blakme/python-formatter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme

Introduction

Test Status Coverage Status

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.

Install

To install simply execute python setup.py install or pip install formatter2. If you want to run the tests first, run nosetests

Usage

To format all of your code recursively (MAKE BACKUPS!):

python-formatter -r DIRECTORY

Or:

format-python -r DIRECTORY

About

A Python formatter based on the Python tokenize lib to ensure validity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%