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

Conversation

sbrugman
Copy link
Contributor

Closes #195

@seddonym
Copy link
Owner

@QasimK as the original requester of this feature, would you mind taking a look and checking this meets your needs?

@seddonym seddonym self-requested a review February 27, 2024 16:03
Copy link
Owner

@seddonym seddonym left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this!

I have to admit I am not that familiar with the reason for needing this feature, so I'm going to see if @QasimK has anything to add. But generally looks good apart from the exception in the .importlinter file.

I would feel more comfortable with this if there was a smoke test for this functionality. I'd like CI to fail if, say, the lint_imports_command function was renamed elsewhere without updating it here. Maybe something added to the tox.ini to run the tool in this way?

exhaustive = true
exhaustive_ignores =
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?

@seddonym seddonym self-requested a review February 27, 2024 16:05
Copy link
Owner

@seddonym seddonym left a comment

Choose a reason for hiding this comment

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

Apologies, I meant to request changes 🤦🏻

@@ -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.

@@ -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.

Could we also have a line added to the CHANGELOG?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it possible to run using python -m
2 participants