Skip to main content

flake8-absolute-import: A flake8 plugin to require absolute imports

Current Development Version

GitHub Workflow Status

Most Recent Stable Release

PyPI Version Python Versions

Info

MIT License black formatted PePY stats


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.

Metadata

Release files for flake8-absolute-import 1.0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flake8-absolute-import 1.0.0.3
File Size Uploaded
flake8_absolute_import-1.0.0.3.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flake8-absolute-import 1.0.0.3
File Interpreter ABI Platform
flake8_absolute_import-1.0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 16.8 kB

Release files / flake8_absolute_import-1.0.0.3.tar.gz

Download URL flake8_absolute_import-1.0.0.3.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
84b2bb2dbad98227a333ca4ba30357e073117ecd6b068b46ac5906fa9a7ed39e
BLAKE2b-256 checksum
How to use checksums
00b399967e98c60d82884886c6d0b607d80ccb4a474c69734c60f0533cf1f9d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / flake8_absolute_import-1.0.0.3-py3-none-any.whl

Download URL flake8_absolute_import-1.0.0.3-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de62300044f5060f32dbe5cbfa0ad7b345231323c572077997d9c8ae6241b189
BLAKE2b-256 checksum
How to use checksums
0597a2f279f6c749912ad7d254af9c8ec845736352f6d162fb0fc25000d26e22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

1.0.0.3 This release

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page