flake8 plugin to require absolute imports
Project description
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 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.7 is required.
Source on GitHub. Bug reports and feature requests are welcomed at the Issues page there.
Copyright (c) Brian Skinn 2019-2021
License: The MIT License. See LICENSE.txt for full license terms.
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 Distributions
Built Distribution
Hashes for flake8_absolute_import-1.0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d24f189bca52ffc0d13e8046606ea42d22a9ad9d409bf39e52b93493cf2ffd2c |
|
MD5 | a22202de887b617820af009af07a970c |
|
BLAKE2b-256 | 5b90a117932fd7ae43da11f239182b9fc8fc23e26bdd24abec76a5a4c3e31aca |