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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flake8-allowlist-imports-0.1.2.tar.gz.
File metadata
- Download URL: flake8-allowlist-imports-0.1.2.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
041c833d83b9599a315fa4a00b203969a982375a5347510baf871337af08c6ac
|
|
| MD5 |
c569b6cd4c9c7349a5046d8efd5a643a
|
|
| BLAKE2b-256 |
6b50875227e175c43b86b8486accceaef193c971f0416a2109ea96bb34705fba
|
File details
Details for the file flake8_allowlist_imports-0.1.2-py3-none-any.whl.
File metadata
- Download URL: flake8_allowlist_imports-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
227b20b871e7c3a1f08ad02a1d9b2ef0885e4d62a04241cd8eb1bf2e46655045
|
|
| MD5 |
995b5d39943775449ab3edd58ade84e6
|
|
| BLAKE2b-256 |
2c76163eb8e5747332a0ac34bebf063b8f57e513351ebb4d775b5b2c497f6257
|