Flake8 Absolute Imports Plugin
A Flake8 plugin that enforces absolute imports in Python projects.
Installation
pip install flake8-absolute-imports
Usage
Add to your flake8 configuration (e.g. .flake8):
[flake8]
plugins = flake8-absolute-imports
select = IA
Error Codes
| Code | Description |
|---|---|
| IA001 | Relative imports are not allowed |
Example
Bad:
from ..utils import helper # IA001
from .models import User # IA001
Good:
from my_project.utils import helper
from my_project.models import User
Development
Install development dependencies:
pip install -e .[dev]
Run tests:
pytest
Run flake8 with the plugin:
flake8 your_file.py
License
MIT
Metadata
Release files for flake8-extensions 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flake8_extensions-0.1.1.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_extensions-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / flake8_extensions-0.1.1.tar.gz
| Download URL | flake8_extensions-0.1.1.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f248de3a14232eaf43b2718fe165ea9dbff45563ac26f7bbfff929699cc5d8c
|
|
BLAKE2b-256 checksum How to use checksums |
7c43254bdff9744ed726f5bb5a0c5d9b28af55871670bc687ca1a27934c048a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / flake8_extensions-0.1.1-py3-none-any.whl
| Download URL | flake8_extensions-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e7d8055256f3bcc8f2f5ea756a4f9a25fde4625c3e847668235d7a66e131c37
|
|
BLAKE2b-256 checksum How to use checksums |
9fdcbf1e77acfe24ec562b2c0cdc703b094db2a14b17c4811ff3db83cff91e3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|