From 7c44190b2cde04526d6f821034ecc109ea57da2f Mon Sep 17 00:00:00 2001 From: Rok Fajfar Date: Sat, 20 Sep 2025 07:00:34 +0200 Subject: [PATCH] Remove redundant type statement list I've removed the same list in two files. It isn't used anywhere. Issue: #75 --- pysmartdatamodels/pysmartdatamodels.py | 3 --- pysmartdatamodels/pysmartdatamodels/pysmartdatamodels.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/pysmartdatamodels/pysmartdatamodels.py b/pysmartdatamodels/pysmartdatamodels.py index 2ce51e97e2..5a92339712 100644 --- a/pysmartdatamodels/pysmartdatamodels.py +++ b/pysmartdatamodels/pysmartdatamodels.py @@ -1148,7 +1148,6 @@ def generate_sql_schema(model_yaml: str) -> str: # Initialize SQL schema statements sql_schema_statements = [] - sql_type_statement = [] sql_data_types = "" @@ -1195,8 +1194,6 @@ def generate_sql_schema(model_yaml: str) -> str: field_type = f"{entity}_type" else: field_type = f"{key}_type" - # create sql create type statment - sql_type_statement.append(f"CREATE TYPE {field_type} AS ENUM ({','.join(map(repr, enum_values))});") sql_data_types += "CREATE TYPE " + field_type + " AS ENUM (" sql_data_types += f"{','.join(map(repr, enum_values))}" diff --git a/pysmartdatamodels/pysmartdatamodels/pysmartdatamodels.py b/pysmartdatamodels/pysmartdatamodels/pysmartdatamodels.py index 2ba67859cb..864b11099e 100644 --- a/pysmartdatamodels/pysmartdatamodels/pysmartdatamodels.py +++ b/pysmartdatamodels/pysmartdatamodels/pysmartdatamodels.py @@ -1147,7 +1147,6 @@ def generate_sql_schema(model_yaml: str) -> str: # Initialize SQL schema statements sql_schema_statements = [] - sql_type_statement = [] sql_data_types = "" @@ -1194,8 +1193,6 @@ def generate_sql_schema(model_yaml: str) -> str: field_type = f"{entity}_type" else: field_type = f"{key}_type" - # create sql create type statment - sql_type_statement.append(f"CREATE TYPE {field_type} AS ENUM ({','.join(map(repr, enum_values))});") sql_data_types += "CREATE TYPE " + field_type + " AS ENUM (" sql_data_types += f"{','.join(map(repr, enum_values))}"