illegal import detector, plugin for flake8
Project description
An extension for Flake8 to make sure that certain packages aren’t imported in a directory
Plugin for Flake8
When both Flake8 and flake8-illegal-import are installed, the plugin is available in flake8:
$ flake8 --version 3.6.0 (flake8-illegal-import: 0.1.0, […]
Parameters
This module requires 2 parameters: –illegal-import-dir={path} –illegal-import-packages={pkg1},{pkg2}
E.g usage:
$ flake8 ./sample.py --illegal-import-dir=./ --illegal-import-packages=os --select=II101
>>/home/…/test/sample.py:14:1: II101 importing this package is forbidden in this directory (os)
Error codes
This plugin is using the following error codes:
Presence of forbidden imports |
|
II101 |
importing this package is forbidden in this directory {pkg} |
Operation
The plugin will go through all imports and find out if forbidden packages are imported in the given directory
Changes
0.1.0 - 2019-01-XX
Initial release
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
Hashes for flake8-illegal-import-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 923135de84b591745b3e5a72ade57c37ee80709de6a5640b524c9e49f6dc13be |
|
MD5 | f98033fe0cdbc874bdd3c6271de450c9 |
|
BLAKE2b-256 | 4cd9bfc56199f034821bd9aed075d5bc24e7ed12f5316d4c06b082ef1d522ee8 |