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
Commit everything localy
Create the release tag
git tag 0.?.?
Create you source distribution to regenerate ChangeLog properly
$ python setup.py sdist
Overwrite the release tag
git tag --force 0.?.?
Push to Github, create a release
Build source and distribution:
$ rm -rfv dist/* $ 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.4.linux-x86_64.tar.gz
(284.1 kB
view details)
Built Distribution
File details
Details for the file fiximports-0.1.4.linux-x86_64.tar.gz
.
File metadata
- Download URL: fiximports-0.1.4.linux-x86_64.tar.gz
- Upload date:
- Size: 284.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a64509f588f3abcf0a00d916db6bce29e1d24dcc68065c67639f9b3edb6c8e6 |
|
MD5 | 3433757f9df0f8adb5f94d889fb14825 |
|
BLAKE2b-256 | 9880dafae3997ff7180c1f8664b05cd7af1b81538f22fde731e7a147471e8890 |
File details
Details for the file fiximports-0.1.4-py2.py3-none-any.whl
.
File metadata
- Download URL: fiximports-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 315.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7639eb7b5edfff1e1e6288e5fd31f5512ef43631303d91d958bf9ac65f601b59 |
|
MD5 | c029835496e31da289a1dd337a322734 |
|
BLAKE2b-256 | 6bf6f1acbf8a7974fa880df521566de0079f77166a374032a365143311c4796a |