The __main__ function should take no arguments.

setup.py won't pass any arguments to `main()`, so the default entry
point should get them itself from `sys.argv`.
This commit is contained in:
Fabio Manganiello 2023-08-17 01:35:39 +02:00
parent a52de0e086
commit 3bf068e0b2
Signed by: blacklight
GPG key ID: D90FBA7F76362774
2 changed files with 5 additions and 5 deletions

View file

@ -1,5 +1,3 @@
import sys
from platypush.runner import main from platypush.runner import main
main(*sys.argv[1:]) main()

View file

@ -1,7 +1,9 @@
import sys
from ._runner import ApplicationRunner from ._runner import ApplicationRunner
def main(*args: str): def main():
""" """
Main application entry point. Main application entry point.
@ -11,7 +13,7 @@ def main(*args: str):
""" """
app_runner = ApplicationRunner() app_runner = ApplicationRunner()
app_runner.run(*args) app_runner.run(*sys.argv[1:])
__all__ = ["ApplicationRunner", "main"] __all__ = ["ApplicationRunner", "main"]