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"
# (currently uses regex but i want to replace it with something better in the future)
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.0.0.post2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3952ab6958769f8b36905274cded403bfdb74d469e2e6c6279773d6d78dc030 |
|
MD5 | 1831ace664af2b544fa8dd0421a5d677 |
|
BLAKE2b-256 | 2ef7a7ef9ca1e84773eeb9a64ab8290d741d0076479e8ff21684e169bbad586a |
Close
Hashes for pylint_module_boundaries-1.0.0.post2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 281fd6a6f3af4aa03bdfa6012cd4def5e3ea43f460f1f869d1347b586ff6c80d |
|
MD5 | c0067f10e5e0bca7fd0657d0ae59dd69 |
|
BLAKE2b-256 | f39b1cfb6f935230700816244dd8d31a6b4c12faa339e4eb4fd69165079af09c |