This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Reorder import statements in Python files

Project Description

Python Fix Imports is a Python executable that can automatically reorganize the import statements of your Python script, by splitting single import statement importing several package into as many import statement as imported module (“one import, one line” principle), and sorting these import statements respecting position of group of them.

The main advantage for this method is to strictly restrict the forms of import statement and facilitate multiple code branch merges and rebase, while still allowing to specify a given order if it is the wish of the developer.

Please read the full rational online documenation for more information.

Sublime Text 3 users can use my Python Fix Imports plugin.

Example

Fix imports allows you to automatically turn:

from any_module import d, f
from other_module import z, x
from any_module import (b,
                        e)
from any_module import a, \
                       c

from a_module_that_should_be import at, after, all_others

into:

from any_module import a
from any_module import b
from any_module import c
from any_module import d
from any_module import e
from any_module import f
from other_module import x
from other_module import z

from a_module_that_should_be import after
from a_module_that_should_be import all_others
from a_module_that_should_be import at

Fiximport installation

$ pip install fiximports
Release History

Release History

This version
History Node

0.1.16

History Node

0.1.15

History Node

0.1.14

History Node

0.1.13

History Node

0.1.12

History Node

0.1.11

History Node

0.1.11.dev1

History Node

0.1.10

History Node

0.1.8

History Node

0.1.7

History Node

0.1.4

History Node

0.1.2.dev3

History Node

0.1.1.dev1

History Node

0.1.0

History Node

0.0.1

History Node

0.0.1.dev3

History Node

0.0.1.dev2

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
fiximports-0.1.16-py2.py3-none-any.whl (256.5 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jun 12, 2017
fiximports-0.1.16.tar.gz (222.6 kB) Copy SHA256 Checksum SHA256 Source Jun 12, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting