Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv committed Jan 12, 2024
1 parent 408ec3d commit e1ac606
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions defog/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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(
Expand Down
6 changes: 4 additions & 2 deletions defog/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,17 @@ 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",
"text",
"character",
"varchar",
"char",
"string"
"string",
]:
# get the total number of rows and number of distinct values in the table for this column
cur.execute(
Expand Down

0 comments on commit e1ac606

Please sign in to comment.