In main.py.tpl, rename main to entry_point and _main to main. The justification here is that Python code that calls the program's main will almost always want to pass arguments, in which case it would call the old _main. However, having a leading underscore indicates a private function.
This will also help when main is dependency injected, in which case we can have three functions: A zero-arg entry_point for setuptools, a main which is passed argv, and _main which is passed argvand the dependency-injected functions.
In
main.py.tpl
, renamemain
toentry_point
and_main
tomain
. The justification here is that Python code that calls the program's main will almost always want to pass arguments, in which case it would call the old_main
. However, having a leading underscore indicates a private function.This will also help when main is dependency injected, in which case we can have three functions: A zero-arg
entry_point
for setuptools, amain
which is passedargv
, and_main
which is passedargv
and the dependency-injected functions.