Natural Language
- English
Framework
- Flake8
Intended Audience
- Developers
Operating System
- OS Independent
Programming Language
- Python
- Python :: 3
- Python :: 3 :: Only
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
Topic
- Software Development :: Quality Assurance
Typing
- Typed
Development Status
- 5 - Production/Stable
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.