-
-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
120 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
[importlinter] | ||
root_package = wemake_python_styleguide | ||
include_external_packages = True | ||
|
||
|
||
[importlinter:contract:layers] | ||
name = Layered architecture of our linter | ||
type = layers | ||
|
||
containers = | ||
wemake_python_styleguide | ||
|
||
layers = | ||
checker | ||
transformations | ||
presets | ||
visitors | ||
violations | ||
logic | ||
compat | ||
options | ||
constants | ||
types | ||
|
||
|
||
# TODO: provide independence contract for visitors | ||
[importlinter:contract:violation-independence] | ||
name = Independence contract for violations (all shall be free!) | ||
type = independence | ||
|
||
modules = | ||
wemake_python_styleguide.violations.naming | ||
wemake_python_styleguide.violations.complexity | ||
wemake_python_styleguide.violations.consistency | ||
wemake_python_styleguide.violations.best_practices | ||
wemake_python_styleguide.violations.refactoring | ||
wemake_python_styleguide.violations.oop | ||
|
||
|
||
[importlinter:contract:flake8-independence] | ||
name = Independence contract for flake8 API (all shall be free!) | ||
type = independence | ||
|
||
modules = | ||
wemake_python_styleguide.checker | ||
wemake_python_styleguide.formatter | ||
|
||
|
||
[importlinter:contract:api-restrictions] | ||
name = Forbids to import anything from dependencies | ||
type = forbidden | ||
|
||
source_modules = | ||
wemake_python_styleguide | ||
|
||
forbidden_modules = | ||
# Important direct and indirect dependencies: | ||
flake8 | ||
pygments | ||
isort | ||
bandit | ||
eradicate | ||
pydocstyle | ||
pycodestyle | ||
mccabe | ||
radon | ||
|
||
ignore_imports = | ||
# These modules must import from flake8 to provide required API: | ||
wemake_python_styleguide.checker -> flake8 | ||
wemake_python_styleguide.formatter -> flake8 | ||
wemake_python_styleguide.formatter -> pygments | ||
wemake_python_styleguide.options.config -> flake8 | ||
|
||
|
||
[importlinter:contract:tests-restrictions] | ||
name = Explicit import restrictions for tests | ||
type = forbidden | ||
|
||
source_modules = | ||
wemake_python_styleguide | ||
|
||
forbidden_modules = | ||
tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters