-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Move main out of __init__ #65
Comments
Move it into |
Pull request #67 |
Personally, I would say
def main(argv=None):
...
import sampleproject.cli
sampleproject.cli.main() |
I think this is a matter of project choice. I don't think there's a particular best practice consensus here. So I'm inclined to keep things as they are as it's the simplest option. Also, I don't like needing to import from The import foo.__main__
foo.__main__.main([my, arguments, to, supply]) feels clumsy (I wouldn't do |
What do others think about just adding a
? As an aside, would a comment in |
I think mimicking My response on the PR is relevant too. |
It'd probably be better to encourage people to keep
__init__.py
minimal.The text was updated successfully, but these errors were encountered: