Pylint force absolute imports plugin
What for?
Following PEP8 recommendation about imports, import statements should be absolute :
Standard library code should avoid complex package layouts and always use absolute imports.
# project/
# |---- __init__.py
# |---- employee.py
from .employee import Employee # <- BAD
from project.employee import Employee # <- Good
Installation
pip install pylint_absolute_imports
Usage
In pylint.rc:
[MASTER]
load-plugins=pylint_absolute_imports
Or, in terminal:
pylint --load-plugins pylint_absolute_imports foo.py
Release files for pylint-absolute-imports 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pylint_absolute_imports-1.1.0.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pylint_absolute_imports-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 kB
Release files / pylint_absolute_imports-1.1.0.tar.gz
| Download URL | pylint_absolute_imports-1.1.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ea2bb868626c4662b76cb84d541af4e4cc4a355872fa28def72ad4439b31717
|
|
BLAKE2b-256 checksum How to use checksums |
b92890a1e9abc2ad009d5ae2899bf19b55c97ec6fd71c6a849af429f54d552e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / pylint_absolute_imports-1.1.0-py3-none-any.whl
| Download URL | pylint_absolute_imports-1.1.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3fa7b73481c50cb7e7892d5eeaecf8108ad0ed06d9a545b5c620d20250a1f727
|
|
BLAKE2b-256 checksum How to use checksums |
e658dcb5694dd51a4cba799dff0951024e2fdc24cf9b51c90c2f16c5b89a5d66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|