diff --git a/defog/cli.py b/defog/cli.py index 5a4fd3b..dfc26d8 100644 --- a/defog/cli.py +++ b/defog/cli.py @@ -283,7 +283,7 @@ def gen(): table_name_list = re.split(r"\s+", table_names.strip()) else: table_name_list = sys.argv[2:] - + if table_name_list == [""] or table_name_list == []: print("No tables were registered. Exiting.") sys.exit(0) @@ -295,7 +295,7 @@ def gen(): scan = True else: scan = False - + filename = df.generate_db_schema(table_name_list, scan=scan) pwd = os.getcwd() print( diff --git a/defog/util.py b/defog/util.py index 2e9932b..b63b624 100644 --- a/defog/util.py +++ b/defog/util.py @@ -73,7 +73,9 @@ def identify_categorical_columns( # if it is a categorical variable, then we want to get the distinct values and their counts # we will then send this to the defog servers so that we can generate a column description # for each categorical variable - print(f"Identifying categorical columns in {table_name}. This might take a while if you have many rows in your table.") + print( + f"Identifying categorical columns in {table_name}. This might take a while if you have many rows in your table." + ) for idx, row in enumerate(rows): if row["data_type"].lower() in [ "character varying", @@ -81,7 +83,7 @@ def identify_categorical_columns( "character", "varchar", "char", - "string" + "string", ]: # get the total number of rows and number of distinct values in the table for this column cur.execute(