Coverage for /Users/fmorton/GitHub/BirdBrain-Python-Library-2/src/birdbrain_python_library_2/cli.py: 100%
4 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-05-12 11:24 -0400
« prev ^ index » next coverage.py v7.8.0, created at 2025-05-12 11:24 -0400
1"""
2Module that contains the command line app.
4Why does this file exist, and why not put this in __main__?
6 You might be tempted to import things from __main__ later, but that will cause
7 problems: the code will get executed twice:
9 - When you run `python -mbirdbrain_python_library_2` python will execute
10 ``__main__.py`` as a script. That means there won't be any
11 ``birdbrain_python_library_2.__main__`` in ``sys.modules``.
12 - When you import __main__ it will get executed again (as a module) because
13 there's no ``birdbrain_python_library_2.__main__`` in ``sys.modules``.
15 Also see (1) from http://click.pocoo.org/5/setuptools/#setuptools-integration
16"""
17import sys
20def main(argv=sys.argv):
21 """
22 Args:
23 argv (list): List of arguments
25 Returns:
26 int: A return code
28 Does stuff.
29 """
30 print(argv)
31 return 0