Skip to content
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: 4 additions & 0 deletions cogapp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
"""

from .cogapp import Cog as Cog, CogUsageError as CogUsageError, main as main


if __name__ == "__main__":
Copy link
Owner

Choose a reason for hiding this comment

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

Why is this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was here to enable calling the app as python -m cogapp <cli_args>. https://docs.python.org/3/library/__main__.html#idiomatic-usage

I used it while testing out the --help output and figured it would be useful to keep. I'm fine taking it out if you don't want it there though.

Choose a reason for hiding this comment

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

There is already a __main__.py that handles that

main()
Loading