flake8 plugin to require absolute imports
Project description
flake8-absolute-import: A flake8 plugin to require absolute imports
Current Development Version
Most Recent Stable Release
Info
Don't like relative imports?
Lint 'em out!
flake8-absolute-import uses a direct check of the AST for each
from x import y statement to flag relative imports.
Specifically, it checks for a nonzero level attribute on each
ImportFrom node.
Relative imports raise the ABS101 error code:
from foo import bar # OK
from .foo import bar # ABS101
Available on PyPI (pip install flake8-absolute-import).
flake8 should automatically detect and load the plugin. flake8>=5.0 is
required.
Source on GitHub. Bug reports and feature requests are welcomed at the Issues page there.
Copyright (c) Brian Skinn 2019-2025
The flake8-absolute-import documentation (currently docstrings and README) is
licensed under a Creative Commons Attribution 4.0 International License
(CC-BY). The flake8-absolute-import codebase is released under the MIT
License. See LICENSE.txt for full license terms.
Project details
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_absolute_import-1.0.0.3.tar.gz.
File metadata
- Download URL: flake8_absolute_import-1.0.0.3.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84b2bb2dbad98227a333ca4ba30357e073117ecd6b068b46ac5906fa9a7ed39e
|
|
| MD5 |
e475e33062b361ac3983e49a028d4f52
|
|
| BLAKE2b-256 |
00b399967e98c60d82884886c6d0b607d80ccb4a474c69734c60f0533cf1f9d5
|
File details
Details for the file flake8_absolute_import-1.0.0.3-py3-none-any.whl.
File metadata
- Download URL: flake8_absolute_import-1.0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de62300044f5060f32dbe5cbfa0ad7b345231323c572077997d9c8ae6241b189
|
|
| MD5 |
63db7ce5a04a194a0ce779c8aa1d6b2b
|
|
| BLAKE2b-256 |
0597a2f279f6c749912ad7d254af9c8ec845736352f6d162fb0fc25000d26e22
|