Flake8 plugin that checks for forbidden imports in your code
Project description
Flake8 Import Linter
Flake8 plugin that checks for forbidden imports in your code
It works for both python2 and python3 since it only uses ast and configparser libraries :)
Usage
-
flake8 config
add "flake8_import_linter" section
add "forbidden_modules" config
example:
[flake8_import_linter]
forbidden_modules = pytest, unittest
-
run flake8 as always
flake8 .
-
if a forbidden module is detected, flake8 will show:
IMP100 forbidden import
ENJOY!
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
Close
Hashes for flake8_import_linter-0.1.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe01667b99259a6e6220338f4f494bcdb3e98d6df34af3c0fcd6e67f183d06ae |
|
MD5 | 7b18be9a4ba3f05652942d45842ce4ae |
|
BLAKE2b-256 | 7e959e70cfdc686a7a6bb609d1fcdeecae6cbb9fd37480bac3fcb0865439ef88 |