From ab0d5e1557ed72968eff30912c823cb3a261c2fd Mon Sep 17 00:00:00 2001 From: "xnuinside@gmail.com" Date: Sun, 15 Aug 2021 01:26:57 +0300 Subject: [PATCH] clean up code --- omymodels/converter.py | 2 -- omymodels/types.py | 3 --- tests/converter/test_converter.py | 4 ++-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/omymodels/converter.py b/omymodels/converter.py index 679d66b..8445c16 100644 --- a/omymodels/converter.py +++ b/omymodels/converter.py @@ -18,7 +18,6 @@ def prepare_columns_data(columns: List[Dict]) -> List[Dict]: if column["type"] is None: if column["default"]: column["type"] = type(column["default"]).__name__ - print(column["type"]) return columns @@ -26,7 +25,6 @@ def models_to_meta(data: List[Dict]) -> List[TableMeta]: tables = [] types = [] for model in data: - print(model["parents"]) if "Enum" not in model["parents"]: model["table_name"] = model["name"] model["columns"] = prepare_columns_data(model["attrs"]) diff --git a/omymodels/types.py b/omymodels/types.py index 264241c..3fc33b4 100644 --- a/omymodels/types.py +++ b/omymodels/types.py @@ -108,12 +108,9 @@ def prepare_column_type_orm(obj: object, column_data: Dict) -> str: if "[" in column_data.type and column_data.type not in json_types: obj.postgresql_dialect_cols.add("ARRAY") column_type = f"ARRAY({column_type})" - print(column_type) return column_type -from typing import Dict - string_types = ( "str", "Text", diff --git a/tests/converter/test_converter.py b/tests/converter/test_converter.py index 816ed59..3826097 100644 --- a/tests/converter/test_converter.py +++ b/tests/converter/test_converter.py @@ -2,7 +2,7 @@ def test_convert_models(): - + models_from = """ class MaterialType(str, Enum): @@ -45,4 +45,4 @@ class Material(db.Model): created_at = db.Column(db.DateTime()) updated_at = db.Column(db.DateTime()) """ - assert result == expected \ No newline at end of file + assert result == expected