flake8 plugin to allowlist imports
Project description
flake8-allowlist-imports
flake8 plugin which validates imports against an allowlist
installation
pip install flake8-allowlist-imports
flake8 codes
Code | Description |
---|---|
FAI001 | third party package is not allowed by the allowlist |
rationale
flake8-allowlist-imports helps with constraining imports when building applications in a team
configuration
This plugin expects a comma-separated list of package names to allow.
Packages can be specified via --import-allowlist
or as part of the flake8 configuration:
[flake8]
import-allowlist = mypackage,requests
as a pre-commit hook
See pre-commit for instructions.
Sample .pre-commit-config.yaml
:
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-allowlist-imports==0.1.1]
args:
- --import-allowlist
- mypackage,requests
Project details
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
Close
Hashes for flake8-allowlist-imports-0.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd33174bd78eb33a395d28315b2325c5c3c9e7f3400ec4444792a65463482d44 |
|
MD5 | 6f0d1387a63974c7aea86aadbf733a9b |
|
BLAKE2b-256 | 8abad1b8c5fc3bd170afaf9eeff029ea8459296f974734d89076f87b01abcffe |
Close
Hashes for flake8_allowlist_imports-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f47dce1fe9abaf122ba9b5d467144a2fe55c64ff15ba76227c14b22c48073989 |
|
MD5 | ac51e6f5b14688a1a5b77b0fd71afc6f |
|
BLAKE2b-256 | 64df87f61d4189b5ffdc67b16f1ea74e8bcd646b943216d39dcf0b80abe12312 |