From 02cad9d3ddeb5f167d8c0181e7be5107dc73a75f Mon Sep 17 00:00:00 2001 From: Marco Ceppi Date: Thu, 23 Mar 2023 20:49:44 -0400 Subject: [PATCH] fix: make sure bin entrypoint matches -m entrypoint --- pyproject.toml | 2 +- yafti/__main__.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 20a8edb..6ded49c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ ] [tool.poetry.scripts] -yafti = "yafti.__main__:run" +yafti = "yafti.__main__:app" [tool.poetry.dependencies] python = "^3.11" diff --git a/yafti/__main__.py b/yafti/__main__.py index 24bd57e..d249021 100644 --- a/yafti/__main__.py +++ b/yafti/__main__.py @@ -33,5 +33,9 @@ def run(config: typer.FileText = typer.Argument("/etc/yafti.yml"), debug: bool = app.run(None) -if __name__ == "__main__": +def app(): typer.run(run) + + +if __name__ == "__main__": + app()