Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support running as python -m importlinter #217

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .importlinter
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ layers=
adapters
application
domain
exhaustive = true
exhaustive = true
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than make an exception of this module, can we just list it as the top layer?

exhaustive_ignores =
__main__
5 changes: 5 additions & 0 deletions src/importlinter/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# support running as `python -m importlinter`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to add a line in the docs about this.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also have a line added to the CHANGELOG?

from .cli import lint_imports_command

if __name__ == "__main__":
lint_imports_command()
Loading