From c557307388752a58e616ecbfe350278a829f65c9 Mon Sep 17 00:00:00 2001 From: Matthew Messinger Date: Fri, 29 Mar 2024 10:01:09 -0400 Subject: [PATCH] Fix flag options in argparser to behave like flags --- pgsqlite/pgsqlite.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pgsqlite/pgsqlite.py b/pgsqlite/pgsqlite.py index 18b2e1c..d3d0a39 100644 --- a/pgsqlite/pgsqlite.py +++ b/pgsqlite/pgsqlite.py @@ -542,32 +542,27 @@ async def create_all_indexes(): parser.add_argument( "-d", "--debug", - type=bool, - default=False, + action='store_true', help="Set log level to DEBUG", ) parser.add_argument( "--show_sample_data", - type=bool, - default=False, + action='store_true', help="After import, show up to 10 rows of the imported data in each table.", ) parser.add_argument( "--drop_tables", - type=bool, - default=False, + action='store_true', help="Prior to import, drop tables in the target database that have the same name as tables in the source database", ) parser.add_argument( "--drop_everything", - type=bool, - default=False, + action='store_true', help="Prior to import, drop everything (tables, views, triggers, etc, etc) in the target database before the import", ) parser.add_argument( "--drop_tables_after_import", - type=bool, - default=False, + action='store_true', help="Drop all tables in the target database after import; useful for testing", ) args = parser.parse_args()