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.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
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
Hashes for flake8-absolute-import-1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06f2784078d91e52812dac10c77e09515916c4e455c8bb15cc538fb95f20d9a3 |
|
MD5 | 4ede0c7b12973aaf9326cdc0ff6213d0 |
|
BLAKE2b-256 | bf4fad52cb2817e4ca9e62fcb1ee9d9a7838d148c43d57656fde2c8f56a63391 |
Hashes for flake8_absolute_import-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ea7e60817038133dd7a0d8b5719b955bc22317ab35c7d247b1a2985f96cf8d4 |
|
MD5 | dd95d64e48c5da7231a349336ded250a |
|
BLAKE2b-256 | 4f506fccc9f0f6f4009cb449b1726bbee6b50ffda82e0294f351ff9160e96c90 |