diff --git a/defog/__init__.py b/defog/__init__.py index c238219..65dc43c 100644 --- a/defog/__init__.py +++ b/defog/__init__.py @@ -289,8 +289,10 @@ def generate_postgres_schema( resp = r.json() if "csv" in resp: csv = resp["csv"] - if return_format == "csv": - pd.read_csv(StringIO(csv)).to_csv("defog_metadata.csv", index=False) + if return_format == "csv": + pd.read_csv(StringIO(csv)).to_csv( + "defog_metadata.csv", index=False + ) return "defog_metadata.csv" else: return csv @@ -430,8 +432,10 @@ def generate_redshift_schema( resp = r.json() if "csv" in resp: csv = resp["csv"] - if return_format == "csv": - pd.read_csv(StringIO(csv)).to_csv("defog_metadata.csv", index=False) + if return_format == "csv": + pd.read_csv(StringIO(csv)).to_csv( + "defog_metadata.csv", index=False + ) return "defog_metadata.csv" else: return csv @@ -523,8 +527,10 @@ def generate_mysql_schema( resp = r.json() if "csv" in resp: csv = resp["csv"] - if return_format == "csv": - pd.read_csv(StringIO(csv)).to_csv("defog_metadata.csv", index=False) + if return_format == "csv": + pd.read_csv(StringIO(csv)).to_csv( + "defog_metadata.csv", index=False + ) return "defog_metadata.csv" else: return csv @@ -595,7 +601,7 @@ def generate_databricks_schema( resp = r.json() if "csv" in resp: csv = resp["csv"] - if return_format == "csv": + if return_format == "csv": pd.read_csv(StringIO(csv)).to_csv("defog_metadata.csv", index=False) return "defog_metadata.csv" else: @@ -703,8 +709,10 @@ def generate_snowflake_schema( resp = r.json() if "csv" in resp: csv = resp["csv"] - if return_format == "csv": - pd.read_csv(StringIO(csv)).to_csv("defog_metadata.csv", index=False) + if return_format == "csv": + pd.read_csv(StringIO(csv)).to_csv( + "defog_metadata.csv", index=False + ) return "defog_metadata.csv" else: return csv @@ -780,8 +788,10 @@ def generate_bigquery_schema( resp = r.json() if "csv" in resp: csv = resp["csv"] - if return_format == "csv": - pd.read_csv(StringIO(csv)).to_csv("defog_metadata.csv", index=False) + if return_format == "csv": + pd.read_csv(StringIO(csv)).to_csv( + "defog_metadata.csv", index=False + ) return "defog_metadata.csv" else: return csv