A collection of custom flake8 extensions
Project description
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flake8_extensions-0.1.1.tar.gz.
File metadata
- Download URL: flake8_extensions-0.1.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f248de3a14232eaf43b2718fe165ea9dbff45563ac26f7bbfff929699cc5d8c
|
|
| MD5 |
0b9e03b4338dd99c8ff48dc811b4f8ee
|
|
| BLAKE2b-256 |
7c43254bdff9744ed726f5bb5a0c5d9b28af55871670bc687ca1a27934c048a0
|
File details
Details for the file flake8_extensions-0.1.1-py3-none-any.whl.
File metadata
- Download URL: flake8_extensions-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e7d8055256f3bcc8f2f5ea756a4f9a25fde4625c3e847668235d7a66e131c37
|
|
| MD5 |
ac8fca2c4a223f82e0a14c88d2f05ff6
|
|
| BLAKE2b-256 |
9fdcbf1e77acfe24ec562b2c0cdc703b094db2a14b17c4811ff3db83cff91e3c
|