No project description provided
Project description
pylint module boundaries
a pylint plugin to enforce boundaries between modules in your project. similar to nx's enforce-module-boundaries eslint plugin
example
say you have three packages in your project - common
, package1
, and package2
- you can use the banned-imports
rule to prevent common
from importing anything from package1
or package2
, thus avoiding issues such as circular dependencies.
Pylint can then be used to detect any violations of this rule:
see usage below for a config example
installing
poetry install pylint-module-boundaries
usage
# pyproject.toml
[tool.pylint.MASTER]
load-plugins = "pylint_module_boundaries"
# these regexes must be a full match:
banned-imports = '''
{
"common(\\..*)?": ["package1(\\..*)?", "package2(\\..*)?"],
"scripts(\\..*)?": ["package1(\\..*)?", "package2(\\..*)?"]
}
'''
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
Close
Hashes for pylint_module_boundaries-1.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7678951fc9b9088c92d688d2a6040daa52beb034683a537f0d7b7d8b7a33f791 |
|
MD5 | 2fc6df07b91ef368626d92fd90a5e4d0 |
|
BLAKE2b-256 | 9754aa38f2f739ebd3c35029c50468e4972490f89ca14fda657d245c7349aeca |
Close
Hashes for pylint_module_boundaries-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6674214c803a16047fea6ee97d72979ae727f937d52aa0938eee017516c65bec |
|
MD5 | 571d1844a40cd5f954f1ec38c10fafd3 |
|
BLAKE2b-256 | 8ab14e4fa9cb5cc0749952289324a25844a96d76c5d528f5f61e92137040295e |