From 49ae4953b30346e0deed650d29a42aeced8d3045 Mon Sep 17 00:00:00 2001 From: Florian Maas Date: Mon, 17 Jun 2024 14:22:27 +0200 Subject: [PATCH] formatting --- pypi_scout/scripts/setup.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pypi_scout/scripts/setup.py b/pypi_scout/scripts/setup.py index 51f294d..680b5ed 100644 --- a/pypi_scout/scripts/setup.py +++ b/pypi_scout/scripts/setup.py @@ -1,10 +1,12 @@ import argparse + from pypi_scout.scripts.download_dataset import download_dataset from pypi_scout.scripts.process_dataset import process_dataset from pypi_scout.scripts.setup_pinecone import setup_pinecone from pypi_scout.scripts.upsert_data import upsert_data from pypi_scout.utils.logging import setup_logging + def main(no_upsert): setup_logging() setup_pinecone() @@ -13,10 +15,11 @@ def main(no_upsert): if not no_upsert: upsert_data() + if __name__ == "__main__": parser = argparse.ArgumentParser(description="Run the setup script with optional flags.") - parser.add_argument('--no-upsert', action='store_true', help='If set, do not upsert data to the Pinecone database.') - + parser.add_argument("--no-upsert", action="store_true", help="If set, do not upsert data to the Pinecone database.") + args = parser.parse_args() - + main(no_upsert=args.no_upsert)