Skip to main content

A Python source formatter that uses the tokenize libraryto ensure correctness

Project description

Introduction

Test Status Coverage Status

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!):

python-formatter -r DIRECTORY

Or:

format-python -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

formatter2-1.0.3.tar.gz (17.7 kB view details)

Uploaded Source

File details

Details for the file formatter2-1.0.3.tar.gz.

File metadata

  • Download URL: formatter2-1.0.3.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for formatter2-1.0.3.tar.gz
Algorithm Hash digest
SHA256 61ef78ec9e1624a400c51621c4d7195bd9e868277e8ca69dab37ab69215f1a40
MD5 d0667eb29fe76a4eaacd1e07fa339c1b
BLAKE2b-256 2a5d33e963b131a59b4545b1e2176909db5149b1ae7e90c8a1f4bb9dce87775c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page