Skip to main content

flake8 plugin to require absolute imports

Project description

flake8 plugin to require absolute imports

Current Development Version:

Most Recent Stable Release:


Don’t like relative imports?

Lint ‘em out!

flake8-absolute-import uses a simple 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>=3.0 is required.

Source on GitHub. Bug reports and feature requests are welcomed at the Issues page there.

Copyright (c) Brian Skinn 2019

License: The MIT License. See LICENSE.txt for full license terms.

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flake8-absolute-import, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size flake8_absolute_import-1.0-py3-none-any.whl (5.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size flake8-absolute-import-1.0.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page