Skip to content

Support running as python -m importlinter#217

Open
sbrugman wants to merge 2 commits into
seddonym:mainfrom
sbrugman:patch-3
Open

Support running as python -m importlinter#217
sbrugman wants to merge 2 commits into
seddonym:mainfrom
sbrugman:patch-3

Conversation

@sbrugman

Copy link
Copy Markdown
Contributor

Closes #195

@seddonym

Copy link
Copy Markdown
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

@seddonym seddonym left a comment

Copy link
Copy Markdown
Owner

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?

Comment thread .importlinter
domain
exhaustive = true No newline at end of file
exhaustive = true
exhaustive_ignores =

Copy link
Copy Markdown
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

@seddonym seddonym left a comment

Copy link
Copy Markdown
Owner

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
Copy Markdown
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
Copy Markdown
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