From af51937004a4630d94b0314dda0f66a3e3398529 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Mon, 7 Sep 2020 12:03:49 -0400 Subject: [PATCH] Refactor main module --- examples/miniapps/decoupled-packages/example/__main__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/miniapps/decoupled-packages/example/__main__.py b/examples/miniapps/decoupled-packages/example/__main__.py index 2e4e74da..d57cc194 100644 --- a/examples/miniapps/decoupled-packages/example/__main__.py +++ b/examples/miniapps/decoupled-packages/example/__main__.py @@ -3,7 +3,7 @@ from .containers import ApplicationContainer -if __name__ == '__main__': +def main() -> None: application = ApplicationContainer() application.config.from_ini('config.ini') @@ -22,3 +22,7 @@ if __name__ == '__main__': assert aggregation_service.user_repository is user_repository assert aggregation_service.photo_repository is photo_repository print('Aggregate analytics from user and photo packages') + + +if __name__ == '__main__': + main()