Skip to main content

Python Fix Imports

travis-badge codecov-badge readthedocs-badge pypi-badge download-badge

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

Metadata

Release files for fiximports 0.1.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fiximports 0.1.18
File Size Uploaded Provenance Actions
fiximports-0.1.18.tar.gz 16.7 kB Without provenance Details for fiximports-0.1.18.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fiximports 0.1.18
File Interpreter ABI Platform Actions
fiximports-0.1.18-py2.py3-none-any.whl Python 3, Python 2 none any Details for fiximports-0.1.18-py2.py3-none-any.whl

Total release size: 34.2 kB

Release files / fiximports-0.1.18.tar.gz

Download URL fiximports-0.1.18.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f0216ee55a1bca8ff2a578a9bfc39181ce4553abc4401dd9b6f7c46164e62a13
BLAKE2b-256 checksum
How to use checksums
c73d1627061cf50ff5758d8591a8c749f483b80739a071af7c63453f2c827427
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / fiximports-0.1.18-py2.py3-none-any.whl

Download URL fiximports-0.1.18-py2.py3-none-any.whl
Size 17.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
dafb83f981b430530bef61baf516e1e84d8cb1e202ecadb7d7988a3d0fddb875
BLAKE2b-256 checksum
How to use checksums
0b271e34151c88cef3bfe607e1b4b40b5f21b4513f21f4708a016e5c6061f905
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for fiximports 0.1.18

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page