Reorder import statements in Python files
Project description
Python Fix Imports is a Python module that can automatically reorganize the import statements of your Python script.
Please read the online documenation for more information.
Example
Fix imports allows you to automatically turn:
from any_module import d, f
from any_module import (b,
e)
from any_module import a, \
c,
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
Fiximport installation
$ pip install fiximports
Development environment
$ virtualenv env
$ source env/bin/activate
$ pip install --upgrade -e .
$ pip install -r test-requirements.txt
$ python setup.py --version
Executing tests
$ python setup.py test
Update the dependencies for tests
$ pip-compile test-requirements.in
Generating the documentation
$ python setup.py docs
Release and upload to Pypi
Upload your work to Github
Create a new release on Github
Fetch changes on local:
$ git fetch --all $ git pull --rebase
Create you source distribution to regenerate ChangeLog properly
$ python setup.py sdist
Repush to Github, edit the tag
Build source and distribution:
$ rm -rfv dist/* $ python setup.py sdist $ python setup.py bdist_wheel $ python setup.py bdist_wheel --universal
Upload distributions:
$ twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fiximports-0.1.2.dev3.tar.gz
(15.2 kB
view details)
Built Distribution
File details
Details for the file fiximports-0.1.2.dev3.tar.gz
.
File metadata
- Download URL: fiximports-0.1.2.dev3.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f53938543e12e6959b26f8ea5623168ff0c881030ef3fd764b55999d743ee563 |
|
MD5 | 738b709e27313052bf80d3497e695f44 |
|
BLAKE2b-256 | d0dc44f6c7a3001a276a769be6a6ec8e68fbfac5ba6ef34dc9e1053acbdbf7d7 |
File details
Details for the file fiximports-0.1.2.dev3-py2.py3-none-any.whl
.
File metadata
- Download URL: fiximports-0.1.2.dev3-py2.py3-none-any.whl
- Upload date:
- Size: 316.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3168803a3a3de19a5218fc76dd3a6658abdc2413e590568157cb4d44b2c3808 |
|
MD5 | 604d07cd70624cca44d0a45ae70c5cbd |
|
BLAKE2b-256 | cd3fe2b0bf1c23ad4dd98c5c7441e27edfed44557c3c870d3c91cce9593b2eec |