import-order
CLI that check the ordering of imports. ordering follow a below rules.
Module order: __future__ , standard libraries, site-packages, local.
CONSTANT_NAMES must be the first.
ClassNames must be the second.
Rest must be in alphabetical order.
Requirements
Python 2.7.x or Python 3.3+
How to install
Via pip
$ pip install -U import-order
Or clone source code from repository and install it.
$ git clone https://github.com/spoqa/import-order.git
$ cd import_order
$ python setup.py install # or pip install .
How to use
Use import-order to check your python codes. If you want to check your local package named foo in root directory of package.
$ import-order foo
If you check your directory bar with local packages ( foo , baz ).
$ import-order foo ./bar baz
Or you can check your directory bar , file some.py without local packages (if --only-file is missing, it will raise ValueError ).
$ import-order --only-file ./bar some.py
For more information, look around help command.
$ import-order --help
When you ignore order on purpose, simply add # no import order at the import statement.
from foo.bar import b, a, c # no import order
Metadata
Release files for import-order 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| import-order-0.0.11.tar.gz | 6.9 kB | Without provenance | Details for import-order-0.0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| import_order-0.0.11-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for import_order-0.0.11-py2.py3-none-any.whl |
Total release size: 18.1 kB
Release files / import-order-0.0.11.tar.gz
| Download URL | import-order-0.0.11.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52c8155d6335f393bccff842a6853849fc644c1952a31296f5ea0d179bb55ad4
|
|
BLAKE2b-256 checksum How to use checksums |
0f11d20bef3000425703ebc4102193c73d13fb64c302eef9c78b8630be582be8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / import_order-0.0.11-py2.py3-none-any.whl
| Download URL | import_order-0.0.11-py2.py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b2a09fa9b2c13bf4d8a22865bcac30762995c2d97797a89713074072b655dc27
|
|
BLAKE2b-256 checksum How to use checksums |
3048f9dfab8215095d7bd3ff423dd5eeaba150784133e6ac1fcf2bf8e531eb60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for import-order 0.0.11
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.